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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Top Kudoed Authors