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
Hello all,
I am trying to calculate dynamically the percent difference using Price values from the same column and using filter context from two different columns (Month and Type)
I have been trying this measures formula below but I am sure my DAX is off.
| Month | Type | Price |
| Mar | Income | $1000 |
| Mar | Expense | $500 |
| April | Income | $300 |
| April | Expense | $800 |
Solved! Go to Solution.
Hi @trying2learnpbi ,
Is your problem solved? If it is solved, you can mark the correct answer as a marker, if it is not solved, you can provide detailed information we can help you better.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @trying2learnpbi ,
I hope this below Measures will help you,
Measure 1:
Measure 2:
Measure 3:
Dynamically it will work.
Best Regards,
Ajith Kumar
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
@Ajithkumar_03 thanks for your reply. I tried your format but am getting the error below. It is weird since the Type column has two values (income and expense).
My observation is that for your Expense Calc measure, you do not need to input hard corded "April" month, and similarly for your Income Calc, you do not need the hard coded "April" month filtering.
Your [percent diff] measure is just the margin and I wouldn't call it as percent diff as it is not describing what it is.
@DataNinja777 thanks for the reply. I tried removing April but am getting error message (see screenshot below). Any help would be appreciated.
Dax is like an excel formula. You can delete the blue crossed out part.
Best regards,
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 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |