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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Measures on slicer

Hello, 

 

I have the following:

soochoilondon_0-1663490495603.png

 

Problem: 

When using the date slicer it updates the black card visual correctly, but the white card visual doesn't give the correct corresponding value. It works fine for the Yesterday value but for no other dates in the slicer. 

 

The black card visual is calculating the latest figures using Measures:

Yesterday's Month to Date Total = [Measure 100]+[Measure 200]
 

Where:

 

Measure 100 =
CALCULATE([Total EOD Balance in GBP], FILTER(ALL('V3 Measure for Changes'),'V3 Measure for Changes'[rank]=max('V3 Measure for Changes'[rank])))
 
and 
 
Measure 200 =
  VAR __Max = MAX('V1 Measure Changes'[rank])
RETURN
  CALCULATE([Total Portfolio Balance in GBP], ALL('V1 Measure Changes'),'V1 Measure Changes'[rank]=__Max)
 

The white card visual is calculating the figures from the day prior to the Black cad visual, using the same dataset/calculation:

 

Two Days Ago Month to Date Total = [Measure 105]+[Measure 205]

 

Where:

 

Measure 105 =
CALCULATE([Total EOD Balance in GBP], FILTER(ALL('V3 Measure for Changes'),'V3 Measure for Changes'[rank]=max('V3 Measure for Changes'[rank])-1))
 
Measure 205 =
CALCULATE([Total Portfolio Balance in GBP], FILTER(ALL('V1 Measure Changes'),'V1 Measure Changes'[rank]=max('V1 Measure Changes'[rank])-1))
 
Thank you. 
 
Soo
1 REPLY 1
Greg_Deckler
Super User
Super User

@Anonymous Maybe try this:

Measure 105 =
VAR __Max = MAXX(ALL('V3 Measure for Changes'),[rank])
RETURN
CALCULATE([Total EOD Balance in GBP], FILTER(ALL('V3 Measure for Changes'),'V3 Measure for Changes'[rank]=__Max-1))
 
Measure 205 =
VAR __Max = MAXX(ALL('V3 Measure for Changes'),[rank])
CALCULATE([Total Portfolio Balance in GBP], FILTER(ALL('V1 Measure Changes'),'V1 Measure Changes'[rank]=__Max-1))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.