Forum Discussion
Sammy1965
1 year agoNew Member
If Query in Dax
I have created a live dashboard where I query the posting date of an order in a field using the Posting Date field. For today Warenausgänge heute = CALCULATE(
COUNT('Archiv_Gebuchte_Warenausgän...
johnt75
1 year agoSuper User
You could create a measure like
Prev Day =
VAR ValidDates =
CALCULATETABLE (
DISTINCT ( 'Archiv_Gebuchte_Warenausgänge'[Posting Date] ),
'Archiv_Gebuchte_Warenausgänge'[Posting Date] < TODAY (),
REMOVEFILTERS ( 'Date' )
)
VAR PrevDay =
INDEX (
1,
ValidDates,
ORDERBY ( 'Archiv_Gebuchte_Warenausgänge'[Posting Date], DESC )
)
RETURN
PrevDay
and a similar measure for the 2nd previous day by changing the 1 to 2.
Once you have the measures you should be able to use them as filters in any calculations or visuals you need.