Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Is it possible to check output of MAXX() and display the final measure as 0 or 1 depending on MAXX()>0?
Solved! Go to Solution.
it seems you are using datediff between ship date and delivery date, if you swap the columns, itll work:
Fact table is related to dimItem table on ItemKey (dimItem.ItemKey = factTable.ItemKey, 1 to M). ItemID below is from dimItem.
Each ItemID can have multiple ItemKeys in dimFact.
Fact Table:
Can the last col be displayed as 0 (if value <=0), or 1 (if >0)?
ITEMID | Max Delivery Date | Earliest Ship Date | Max Del Dt - Earliest Ship Date |
A | 9/30/2022 | 1/1/1900 | 54898 |
B | 9/26/2022 | 1/1/1900 | 11930 |
C | 9/25/2022 | 1/1/1900 | 7228 |
D | 9/26/2022 | 1/1/1900 | 4952 |
E | 3/12/2020 | 3/12/2020 | 1 |
F | 11/10/2020 | 11/10/2020 | 1 |
Max Delivery Date = CALCULATE( Maxx(dimItem, dimItem[Max Delivery Date])) | Del Dt Minus Ship Date = IF( Datediff(factSalesLine[Confirmed Ship Date], factSalesLine[Max Delivery Date], DAY) <0,0,1) |
it seems you are using datediff between ship date and delivery date, if you swap the columns, itll work:
measures can be used in if thats odd can you provide with more details? like some sample data wirh your example. and make sure emasure format is whole number then use if([measure] >= INT(0),1,0)
if this helps, kindly accept as solution and a kudos is appreciated