Forum Discussion
kirkademidov
8 years agoFrequent Visitor
To show data by max date range value on slicer
Good day! I have this kind of data And I have this kind on Report I need to show on Current Users Card values from table - relatively to max date chosen on date s...
- 8 years ago
Hi kirkademidov,
with your PBIX it's OK.
You need just one more measure, like this:
Last_Quantity = AVERAGEX( CALCULATETABLE( TOPN(1;'stg StgFactUsers';'stg StgFactUsers'[PkDateKey];DESC) );'stg StgFactUsers'[Quantity] )//AVG
And I changed a little your PBIX, so you can look on all my changes HERE:
Best regs
McCow
8 years agoResolver III
Hi kirkademidov
try this measure, to calculate max date value:
Max_Date_Value =
MAXX(
KEEPFILTERS(VALUES('Dates'[PkDateKey]));
CALCULATE(MAX('Dates'[PkDateKey]))
)I suggest, htat you use "PkDateKey" for your slicer. For better result you can send a PBIX file with example data. It will be IMHO easier.
Best regs
- kirkademidov8 years agoFrequent Visitor
McCow and v-jiascu-msft, thanks for you answer!
I didnt find the way to attache file - you can find it here Dummy pbix - I`ve wrote explanation inside
- McCow8 years agoResolver III
Hi kirkademidov,
with your PBIX it's OK.
You need just one more measure, like this:
Last_Quantity = AVERAGEX( CALCULATETABLE( TOPN(1;'stg StgFactUsers';'stg StgFactUsers'[PkDateKey];DESC) );'stg StgFactUsers'[Quantity] )//AVG
And I changed a little your PBIX, so you can look on all my changes HERE:
Best regs
- kirkademidov8 years agoFrequent Visitor
Thanks a lot!
This is exactly that I need!