Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Good afternoon
I would like to draw a graph in which the line obtained is the subtraction of two selected columns. Should you do it with DAX? Taking into account that you must change depending on the columns you select.
Thanks a lot.
Solved! Go to Solution.
Hi @cdoblare28 ,
You can refer the following links to get it:
Calculate Difference Between Two Columns in Power BI Matrix
Matrix Visual: Subtracting two Columns
2020 = SUMX(FILTER('Table','Table'[Year]=2020),'Table'[Value])
2021 = SUMX(FILTER('Table','Table'[Year]=2021),'Table'[Value])
Variance = [2021] - [2020]
subtract two values in a graph
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
diff = SUM(Sales[Sales Amount])- [Year behind Sales]
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regard
Hi @cdoblare28 ,
You can refer the following links to get it:
Calculate Difference Between Two Columns in Power BI Matrix
Matrix Visual: Subtracting two Columns
2020 = SUMX(FILTER('Table','Table'[Year]=2020),'Table'[Value])
2021 = SUMX(FILTER('Table','Table'[Year]=2021),'Table'[Value])
Variance = [2021] - [2020]
subtract two values in a graph
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
diff = SUM(Sales[Sales Amount])- [Year behind Sales]
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regard
User | Count |
---|---|
127 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |