Forum Discussion

nmhung49's avatar
nmhung49
Helper II
1 year ago
Solved

How to create measure to CALCULATE Qty_In

I’m having trouble with the CALCULATE function for Qty_In, which is incorrect when I select the current year and month. I want the result to display the farm org for the selected month and year, and ...
  • hnguy71's avatar
    1 year ago

    Hi nmhung49 

    You can test if there's a qty, then calculate where document type is 65. You can try this measure:

    IF.EAGER( SUM(factBreeder[QTY]) > 0, CALCULATE( SUM(factBreeder[QTY]), KEEPFILTERS(factBreeder[DOCUMENT_TYPE]   = 65), ALL('Calendar') ) )