Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all,
again, I need help because I am totally lost:
with the help of this forum, I was able to create this chart, and there is now only missing, to show the deltas between the periods (-15% between 2020 and 2021 i.e.).
But I do not have an idea, how to calculate it, because to be able to create that chart, I have the values in one measure:
Is there a way to insert now also the deltas between the periods?
Thank you for any tipp and advice.
Solved! Go to Solution.
Hi @Pfoster ,
To calculate the deltas between periods in your chart using the existing YaQ_Volume measure, you can create a separate DAX measure that captures the previous period’s value and computes the percentage change. Assuming your 'Unrelated Date'[Period] column contains sortable numeric values (e.g., 2020, 2021, or Q1 as 1, Q2 as 2, etc.), use the following DAX:
YaQ_Delta =
VAR CurrentValue = [YaQ_Volume]
VAR PrevValue =
CALCULATE(
[YaQ_Volume],
FILTER(
ALL('Unrelated Date'),
'Unrelated Date'[Category] = MAX('Unrelated Date'[Category]) &&
'Unrelated Date'[Period] = MAX('Unrelated Date'[Period]) - 1
)
)
RETURN
IF(
NOT ISBLANK(PrevValue),
DIVIDE(CurrentValue - PrevValue, PrevValue),
BLANK()
)
This measure evaluates the current value and compares it to the previous period’s value by subtracting one from the current 'Unrelated Date'[Period]. It returns the percentage difference. If the previous value is blank, the measure returns blank to avoid misleading percentages. You can then display this measure as a tooltip or data label in your visual. If your period column is not numeric, this logic will need to be adjusted using a rank or index to establish chronological order.
Best regards,
Hi @Pfoster ,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Chaithanya
Hi @Pfoster ,
To calculate the deltas between periods in your chart using the existing YaQ_Volume measure, you can create a separate DAX measure that captures the previous period’s value and computes the percentage change. Assuming your 'Unrelated Date'[Period] column contains sortable numeric values (e.g., 2020, 2021, or Q1 as 1, Q2 as 2, etc.), use the following DAX:
YaQ_Delta =
VAR CurrentValue = [YaQ_Volume]
VAR PrevValue =
CALCULATE(
[YaQ_Volume],
FILTER(
ALL('Unrelated Date'),
'Unrelated Date'[Category] = MAX('Unrelated Date'[Category]) &&
'Unrelated Date'[Period] = MAX('Unrelated Date'[Period]) - 1
)
)
RETURN
IF(
NOT ISBLANK(PrevValue),
DIVIDE(CurrentValue - PrevValue, PrevValue),
BLANK()
)
This measure evaluates the current value and compares it to the previous period’s value by subtracting one from the current 'Unrelated Date'[Period]. It returns the percentage difference. If the previous value is blank, the measure returns blank to avoid misleading percentages. You can then display this measure as a tooltip or data label in your visual. If your period column is not numeric, this logic will need to be adjusted using a rank or index to establish chronological order.
Best regards,
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |