Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |