March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello and thank you in advance for taking the time to consider my question.
My goal is to be able to calculate the % difference of the number of Event Id's in a quarter compared to another quarter. I would like the choice of the quarter to be dynamic...for example if I wanted to compare Q1 2021 to Q1 2019, I could select those quarters and the % difference would display.
I created a column to designate the calendar year and quarter but am struggling to visualize the necessary steps to accomplish my goal...any suggestions?
This is an example of the format of my query. I have entries up to the current day.
Solved! Go to Solution.
Hi, @Anonymous ;
Sorry for the late reply,I think if you use Percent2 ,you could change dax as follows:
Percent2 = DIVIDE(CALCULATE(COUNT('Table'[Event Id]),FILTER(ALL('Table'),[CY & Qtr]=MAX('slicertable'[CY & Qtr])))-COUNT([CY & Qtr]),COUNT([CY & Qtr]))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
Sorry for the late reply,I think if you use Percent2 ,you could change dax as follows:
Percent2 = DIVIDE(CALCULATE(COUNT('Table'[Event Id]),FILTER(ALL('Table'),[CY & Qtr]=MAX('slicertable'[CY & Qtr])))-COUNT([CY & Qtr]),COUNT([CY & Qtr]))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
Based on your description, I have two ideas. One is to use one slicer to select two quarters for calculate the difference percentage, and the other is to use two slicers to select different quarters for the difference percentage.
One slicer: create a measure
Percent =
CALCULATE (
COUNT ( [Event Id] ),
FILTER ( 'Table', [CY & Qtr] = MIN ( [CY & Qtr] ) ))
/ CALCULATE (
COUNT ( [Event Id] ),
FILTER ( 'Table', [CY & Qtr] = MAX ( [CY & Qtr] ) ))
The final output is shown below:
Two slicer: create a new slicer table as another slicer.
slicertable = SUMMARIZE('Table',[CY & Qtr])
then create a measure :
Percent2 = COUNT([Event Id])/ CALCULATE(COUNT('Table'[Event Id]),FILTER(ALL('Table'),[CY & Qtr]=MAX('slicertable'[CY & Qtr])))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is GREAT!! It's doing exactly what I was looking for. Thank you so much! I elected to go with the Percent2 option to allow a percent increase or decrease to display.
After reviewing the result in more detail, I thought it might be better to display the % Increase instead. Is there anyway to revise the percent2 equation to achieve this result.
First: work out the difference (increase) between the two numbers you are comparing.
Increase = New Number - Original Number
Then: divide the increase by the original number and multiply the answer by 100.
% increase = Increase ÷ Original Number × 100.
If your answer is a negative number, then this is a percentage decrease.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |