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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Using measure with MAX function in a visual

raherdel29_0-1621407167850.png

Hi all,

I have attached a snippet of how my data is in the image above. Basically I have a calculated "Sales%" measure in a card visual to which I have to apply a filter, which will always display the latest year and month i.e in this case 2021-09.
For the latest year I have created a 1/0 calculated column, since the data will at any given time will have only 2 years of data, so the latest year will take '1', this column is put in my visual filter pane so that it shows 2021 figure only in that visual card.
What I also want to show is the latest quarter data i.e in this case the card should show 2021-09 i.e Q3 number, this is something which also needs to go in the visual card filter pane.

 

Can anyone suggest any solution how can this be done?

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Is this what you want?

 

v-lionel-msft_0-1621578631242.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Is this what you want?

 

v-lionel-msft_0-1621578631242.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-lionel-msft Slight modification help needed, instead of using today() in the var syntax, how can I keep it to max of the month in a year. The data provided has its year cycle from June-May, so currently it is the 12th month, hence I need the '1' for  2021-12 month and rest it would be zero, how can I achieve that?

Anonymous
Not applicable

Yes perfect, exactly what I wanted! Thanks a lot @v-lionel-msft kudos!

amitchandak
Super User
Super User

@Anonymous , what is logic of latest month is 2021-09

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

The card visual which displays sales % has a year filter which always shows 2021 data, need to add one more filter which will also show the latest quarter month, i.e in the above case 9, when the 12 months are over this should automatically be changed to 12 and the card visual will be showing 2021 period 12 data. Let me know if that was helpful

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.