cancel
Showing results 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

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.

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:

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
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]) )``

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
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]) )``

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Announcements

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

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors