Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Dear all,
I'm totally novice using the DAX. I would like to calculate a MAT value from the today (ex. we are in P7) over the last 13 periods.
We will make P7 2021 - P72020
| Years | Periods | % Grade A |
| 2021 | P07 | 87,59 |
| 2021 | P06 | 86,78 |
| 2021 | P05 | 87,06 |
| 2021 | P04 | 87,37 |
| 2021 | P03 | 86,17 |
| 2021 | P02 | 86,82 |
| 2021 | P01 | 86,9 |
| 2020 | P13 | 86,64 |
| 2020 | P12 | 86,81 |
| 2020 | P11 | 85,87 |
| 2020 | P10 | 87,58 |
| 2020 | P09 | 87,21 |
| 2020 | P08 | 86,02 |
| 2020 | P07 | 86,44 |
In this case result is => % diff = 1,15 %
Should appear like this for the actual period (P7) (% is wring in this example):
And I would like to make a graph with the calculation:
% Grade A is calculated like this:
Solved! Go to Solution.
Hi @Anonymous ,
Try the following formula:
Measure =
[% Grade A] - CALCULATE(
[% Grade A],
FILTER(
ALLSELECTED(rclms_qa[Years]),
rclms_qa[Years] = MAX(rclms_qa[Years]) - 1
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try the following formula:
Measure =
[% Grade A] - CALCULATE(
[% Grade A],
FILTER(
ALLSELECTED(rclms_qa[Years]),
rclms_qa[Years] = MAX(rclms_qa[Years]) - 1
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 23 |