Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
48 | |
44 | |
19 | |
14 | |
14 |
User | Count |
---|---|
107 | |
55 | |
28 | |
19 | |
14 |