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
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
104 | |
58 | |
45 | |
29 | |
24 |
User | Count |
---|---|
133 | |
94 | |
75 | |
44 | |
41 |