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 guys,
I am struggling to find a solution, the situation is as following
There is a Date slicer where users can select a certain Date range, for example 31-12-2019 to 27-01-2021.
Every date there is a value "Value". Now, I want to calculate the percentage difference with the earliest value available in this date range (in this case on the 31-12-2019) and visualize the difference over time in a line chart. So the chart would always start at an index of 100, because the value is the same as the earliest value available.
The following hard coded example works:
Solved! Go to Solution.
Please try this measure to get your desired chart.
Test 3 =
VAR vMinDate =
MINX (
ALLSELECTED ( 'Calendar'[Date] ),
'Calendar'[Date]
)
VAR vMinValue =
CALCULATE (
SUM ( Facts[Value] ),
'Calendar'[Date] = vMinDate
)
RETURN
DIVIDE (
SUM ( Facts[Value] ),
vMinValue
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Please try this measure to get your desired chart.
Test 3 =
VAR vMinDate =
MINX (
ALLSELECTED ( 'Calendar'[Date] ),
'Calendar'[Date]
)
VAR vMinValue =
CALCULATE (
SUM ( Facts[Value] ),
'Calendar'[Date] = vMinDate
)
RETURN
DIVIDE (
SUM ( Facts[Value] ),
vMinValue
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Awesome, much appreciated!
@sandeo ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
I created a sample .pbix file with just a few records and I have the same problem...
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |