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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.