Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply
kirkademidov
Frequent Visitor

To show data by max date range value on slicer

Good day! 

 

I have this kind of data

 

 

image.png

 

And I have this kind on Report 

 

 

image.png 

I need to show on Current Users Card  values from table - relatively to max date chosen on date slicer. Values on the table are snapshots so I don't need to summarize it only to show. 

 

I suppose that I need to create measure by FILTER data but I`m a little bit confused which dax formula to use. 

 

Thanks a lot!

 
 
1 ACCEPTED SOLUTION

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:

2017-12-23_00-13-08.png

 

Best regs

 

 

View solution in original post

6 REPLIES 6
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @kirkademidov,

 

Can you share a dummy sample please? I can't see any connections between the data and the visualizations. You measure could be like this:

No UID =
CALCULATE (
    MAX ( 'table'[uid] ),
    FILTER ( ALL ( 'datetable' ), 'datetable'[date] = MAX ( 'datetable'[date] ) )
)

Best Regards,

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
McCow
Resolver III
Resolver 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

 

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 

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:

2017-12-23_00-13-08.png

 

Best regs

 

 

Thanks a lot! 

 

This is exactly that I need! 

 

 

 

With pleasure. Enjoy!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.