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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
senthilvaithi
Regular Visitor

Find number of quarters selected in a nested calendar slicer

I have a use case where I need to display sales figures across several years. The interested years are selected in a calendar slicer. Calendar slicer has Years, and Quarters.

senthilvaithi_0-1722048374773.png

This allows users to compare current yr vs last yr vs 5 years ago vs 10 yrs and so forth or compare sales with last 5 years. The curve ball scenario for me, the user can select just couple of quarters for a year, in that case annualize the sales number for that year, and use that in the visual. How do I figure that all 4 quarters for a given year, or just two quarters are selected?

 

My visual will look something similar to:

senthilvaithi_1-1722048569349.png

Here only 2024 is annualized, but any year could have a partially selected period that needs to be annualized. 

How do I figure that all 4 quarters for a given year, or just two quarters are selected? Based on this I will apply the annualization logic.

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@senthilvaithi If in a Year context you could do something like this assuming you have a Quarter column:

Measure = COUNTROWS( DISTINCT('Calendar'[Quarter]) )


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...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

@senthilvaithi If in a Year context you could do something like this assuming you have a Quarter column:

Measure = COUNTROWS( DISTINCT('Calendar'[Quarter]) )


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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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