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
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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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