The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I want to create a measure that would use another measure that is the variance of salesvalues from 2019 and 2020 using the following filters. Not sure how that DAX command would look like.
The most important observation about your model is that it's wrong and you should change it. Hard-coding the names of years in your measures or fields is a clear sign you should really try to make an effort and learn the rules of data modeling for Power BI. If you don't do this... well, you'll be in trouble very soon and rather sooner than later.
NewMeasure =
IF (
AND ( [SALES_VALUE for 2019] <> 0, [SALES_VALUE for 2020] <> 0 ),
[SALES_VALUE for 2020] - [SALES_VALUE for 2019]
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
18 | |
14 |
User | Count |
---|---|
36 | |
34 | |
20 | |
19 | |
15 |