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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |