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.
Hi Team,
Could anyone can able to help me to resolve the below isssue
i had data which need to calculate differences and Percentage based on the Year filter on slicer
How many are selected in slicer we need to calculate differences and Percentage
For Example:
if the User selected year 2020 and 2021 in the slicer we should get differences and Percentage for thsi two years .If again user selected year 2022 then calculation shoulld be done for year 2021 and 2022 on the same column itself , please find the below
screen shot example for your references
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
it is for creating a measure.
difference percent vs previous year: =
VAR _currentvalue = [Value total:]
VAR _previousyearvalue =
CALCULATE ( [Value total:], Data[Year] = MAX ( Data[Year] ) - 1 )
RETURN
IF (
HASONEVALUE ( Data[Year] ) && HASONEVALUE ( Data[ValueType] ),
DIVIDE ( _currentvalue - _previousyearvalue, _previousyearvalue )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi Jihwan_Kim,
Thanks for your quick response but the solution i need
I have a year slicer which contain quarter,year in this format(Q1,2021) (Q2,2022) ... (Q1,2021)
i had put in the slicer visual .Now if the User select the year for example Q1,2020 , Q1,2021 , Q2,2022
below the according the year user selected the value will be displayed as shown in the below image
User has been select 3 quarter data in slicer visual ,Now i need to get the differences between three quarter
like Q1,2021 - Q3,2021 should be first result and then Q3,2021 - Q1-2022 should be second result
I should get result in this format
year SectionA
q1,2021 1822
q3,2021 1414
q1,2022 1495
result 1 b/w q1,2021 - q3,2021 = 408
result 2 b/w q3,2021 - q1,2022 = -81
same if the user selects different year the result should be as first value - second value = result and
second value - third values on the same column on three different rows
Hi ,
I can able to get the result using this measure
Hi @Anonymous,
Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |