Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate quotient over month dimension?

I need to calculate expression.It's shows like quotient:

onefield/secondfield

I need to calculate it in YearToDate type.

Dividend increase separately than divider.But i need to get a sum of mounthly quotient in yeartodate type.How can i get it?

i try to use this formula:

Sum({<Date={'$(<=vMaxDate)'}>}Aggr($(vQuotient),[Nomenclatura]))

NomenclaturaQuotient
type1350


11 Replies
Not applicable
Author

and last question,thx for helping!

how leave only one column with data,so that data changes with selection and data will be YearToDate?
i mean like in your last example,except all column just one..becouse in your example if i choise one month,like a febrary,table show you only febrary value,not YearToDate...

Thanks a lot!

Carlos_Reyes
Partner - Specialist
Partner - Specialist

Haha, it was a little error, the sum was lacking the MonthYear=. Just add it to the first expression, like this:

Sum( {<Date={"<=$(vMaxDate)"}, Month=,MonthYear=>}

    Aggr(

        Sum( {<Date={"<=$(vMaxDate)"}, Month=,MonthYear=>} OneField)

        /

        Sum( {<Date={"<=$(vMaxDate)"}, Month=,MonthYear=>} SecondField)

    ,MonthYear)

)