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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

If logic with set analysis help

Hi Everyone,

Can any one please help me on below requirement.

I have a Dimension called Month and  Two measures like Estimates and Actuals

Estimates:

Sum({$<Year ={'$(=Year(Max([Reporting Date])))'},[Type]={'Estimates'},Month,MonthYear=>}[Amount])/1000000

Actuals:

Sum({$<Year ={'$(=Year(Max([Reporting Date])))'},[Type]={'Income'},Month,MonthYear=>}[Amount])/1000000

Requirement:

I have to derive a Third measure like

when previous month have the actual then need to Apply Estimate -Actual 

when previous month don't have the actual then need to apply Estimate-Estimate.

Please find the below Expected output. Please help me on this.

Thanks in advance.

Above().png

1 Reply
Shubham_Deshmukh
Specialist
Specialist

Hi,

Hope you will get it from this,

=if(above([act])<>0,[est]-RangeSum(above([act]),0),[est]-above([est]))

gtgt.png

Do testing with more data and let me know.

 

Regards,

Shubham