Forum Discussion

johankent30's avatar
johankent30
Helper I
7 years ago

Measure Filter Help

I have the following measure:
Measure 2 = IF(MAX(Collections1[Subcategory])="Sales Orders",'Sales Orders'[Sales Orders Value],
IF(MAX(Collections1[Subcategory])="Purchase Orders",'Purchase Orders'[Purchase Orders Value],
[Measure]+0))
 
I want to be able to filter a subcategory by a date filter. The date filter needs to be from a separate date table. Ideally, the formula would like like the code below, however this does not work. Does anyone know of a way to do this?
 
Measure 2 = IF(MAX(Collections1[Subcategory])="Sales Orders",'Sales Orders'[Sales Orders Value],
IF(MAX(Collections1[Subcategory])="Purchase Orders",CALCULATE('Purchase Orders'[Purchase Orders Value],Collections1[Date Value]=Date[Date]),
[Measure]+0)))

6 Replies

    • johankent30's avatar
      johankent30
      Helper I
      parry2k right now there is now relationship. I’m not opposed to creating one. If I did it would be a many to one relationship from the collections1 table to the date table