Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Very new to Dax so to me this is complicated problem made worse by the data structure. I'm trying to subtract Operating spend from Operating Budget but they are in the same column and need to be compared for the same timeframe so it seems to me that multiple filters will need to be applied for the program to know what value on what row. I think a measure I can show in the report is sufficient. Any help is appreciated. Sample below. Thanks!
Hi,
You would essentially need to use Unpivot Columns under Power Query Editor which would Unpivot the Values under the specified Column, Load the Table and then Calculate the Difference. But Since, You wanted DAX Expression for this, Please use the below mentioned DAX Expression and let me know if the same is working Correctly.
Table1:= CALCULATETABLE(Table, Table[Metric_Name]="Operating Budget") Table2:= ADDCOLUMNS(CALCULATETABLE(Table, Table[Metric_Name]="Operating Spending"),"",CALCULATE(SUM(Table1[Value])-[Value],TREATAS(VALUES(Table[Timeframe_Range]),Table[Timeframe_Range]))
Create Two new Tables with the Following Expression. The Second Table should be the result Table.
Best Regards,
Vignesh M
If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |