Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I currently have 2 identical table visuals which is linked to 2 date slicers (table 1 to slicer 1, table 2 to slicer 2) so the user can compare the values in different period of time. I'd like to make a 3 table which displays the difference between these 2 tables.
So from this, the third table will have the same name for all rows but shows the difference of the two tables (say table 1 - table 2).
My first thought was to create measure for each of the row values in table 1 and 2 that reflects the linked date slicer and create another measure that subtract measure in table 2 from the measure in table 1 but is this something possible in power bi? What would be the DAX code to create measure that reflect a specifc date slicer?
Solved! Go to Solution.
Hi @aume1
You can create a dimension table as:
Table 2 =
VALUES('Table'[Date])
Create measures as:
Period 1 =
CALCULATE(SUM('Table'[Sales]),ALLSELECTED('Table'[Date]))
Perior 2 =
CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Date] in ALLSELECTED('Table 2'[Date])))
Diff =
[Period 1]-[Perior 2]
Here is the output:
Please try the attached demo.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @aume1
You can create a dimension table as:
Table 2 =
VALUES('Table'[Date])
Create measures as:
Period 1 =
CALCULATE(SUM('Table'[Sales]),ALLSELECTED('Table'[Date]))
Perior 2 =
CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Date] in ALLSELECTED('Table 2'[Date])))
Diff =
[Period 1]-[Perior 2]
Here is the output:
Please try the attached demo.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
User | Count |
---|---|
80 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
97 | |
88 | |
81 | |
61 |