March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
my calender date slicer range is as given below :
StockDate : stockcreated date with in the selected calender date range.
PreviousStockDate : Previous Stockcreated Date with in the selected calender date range.
Plese help me to write the Measure for PreviousStockDate column.
Thanks
Solved! Go to Solution.
@Anonymous , Try a measure like
maxx(filter(allselected(Table), Table[Stockdate] <Max(Table[StockDate])),Table[StockDate])
Hi @Anonymous ,
These measures will give you the same result:
Measure =
CALCULATE (
MAX ( 'Table'[StockDate] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Stockdate] < MAX ( 'Table'[StockDate] )
)
)
Measure =
VAR CurrentNo_ =
MAX ( 'Table'[Cust_No] )
VAR PreviousNo_ =
CALCULATE ( MAX ( 'Table'[Cust_No] ), 'Table'[Cust_No] < CurrentNo_ )
RETURN
CALCULATE ( MAX ( 'Table'[StockDate] ), 'Table'[Cust_No] = PreviousNo_ )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
These measures will give you the same result:
Measure =
CALCULATE (
MAX ( 'Table'[StockDate] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Stockdate] < MAX ( 'Table'[StockDate] )
)
)
Measure =
VAR CurrentNo_ =
MAX ( 'Table'[Cust_No] )
VAR PreviousNo_ =
CALCULATE ( MAX ( 'Table'[Cust_No] ), 'Table'[Cust_No] < CurrentNo_ )
RETURN
CALCULATE ( MAX ( 'Table'[StockDate] ), 'Table'[Cust_No] = PreviousNo_ )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try a measure like
maxx(filter(allselected(Table), Table[Stockdate] <Max(Table[StockDate])),Table[StockDate])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |