The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I'm new to DAX and would like some suggestions on how to complete the following;
Table 1 represents the data as we recieve it from the source.
In our efforts to study the data we need to review the information by comparing Run to Run
Table 2 represents the Table 1 duplicated and filtered to only include Run 1
Table 3 represents the Table 1 duplicated and filtered to only include Run 2
We would like to return Table 4, this table would represent the Run 2 - Run 1 and deliver the data row by row as it relates to the attitude column (as shown above).
All help appreciated!!
Solved! Go to Solution.
Thanks for the help, this is exactly what we were looking for!!
@Anonymous -
You can create a new Measure:
Change In Attitude = var run1 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = 1) var run2 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = 2) return run2 - run1
Hope this helps,
Nathan
Thanks for the help!!
Is there a way to make the Run selection a slicer?
We some time have several hundred Runs to compare and creating a Measure for each senario will be quite a challange.
Yes, if you select 2 runs, you could do it like the following:
Change In Attitude =
var firstrun = min('Table 1'[Run])
var secondrun = max('Table 1'[Run]) var run1 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = firstrun) var run2 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = secondrun) return run2 - run1
Thanks for the help, this is exactly what we were looking for!!