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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Usama192
New Member

Show Current and Next Quarters in report

Hi all,
I hope this message will finds you well.

I am working on a report and facing an issue, I need to show the 4 Quarters in a Clustered Bar chart, But the main problem is if the Current Quarter is 2 then 2nd, 3rd, and 4th quarter should show in that visual and 1st quarter of next year will be displayed, in this way 4 quarters will be completed in that visual.
I have worked on it, I have created a column with the current Quarter and one column with the Quarter from the date field.
Applied the If Conditions 
=> "

QuarterFilters = IF('Date'[CurrentQuarters] >= 'Date'[QuarterNumber] && 'Date'[Year] == YEAR(TODAY()) , "True",
IF('Date'[CurrentQuarters] <= 'Date'[QuarterNumber] && 'Date'[Year] == YEAR(TODAY()), "True",
IF('Date'[CurrentQuarters] <= 'Date'[QuarterNumber] && 'Date'[Year] == YEAR(TODAY())+1, "True"
)))"
Above two conditions are showing the True, but the last condition which is related to the Next Year is Showing the False. 

What will be the Solution for this???
1 ACCEPTED SOLUTION
Usama192
New Member

Hi,
I found my mistake.
Here is the right DAX Query.
"

QuarterFilters = IF('lead'[CurrentQuarters] >= 'lead'[QuarterNumber] && 'lead'[Year] == 2021 , "True",
IF('lead'[CurrentQuarters] <= 'lead'[QuarterNumber] && 'lead'[Year] == 2021, "True",
IF('lead'[CurrentQuarters] >= 'lead'[QuarterNumber] && 'lead'[Year] == 2022, "True"
)
))

"

View solution in original post

1 REPLY 1
Usama192
New Member

Hi,
I found my mistake.
Here is the right DAX Query.
"

QuarterFilters = IF('lead'[CurrentQuarters] >= 'lead'[QuarterNumber] && 'lead'[Year] == 2021 , "True",
IF('lead'[CurrentQuarters] <= 'lead'[QuarterNumber] && 'lead'[Year] == 2021, "True",
IF('lead'[CurrentQuarters] >= 'lead'[QuarterNumber] && 'lead'[Year] == 2022, "True"
)
))

"

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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