Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hello,
i have a table with all the purchasing order that look like this:
now i want to compare the difference beetween two years but only for the item that was alredy purchased a year before a given date
is it possibile with dax or i have to work with the data structure?
Solved! Go to Solution.
You can create a measure like
Sales of prior year products =
var latestYear = MAX( 'Date'[Year])
var priorYearProducts = CALCULATETABLE( VALUES('Orders'[Code]), 'Date'[Year] = latestYear - 1)
return CALCULATE([Sales Amount], priorYearProducts)
and you can build similar logic into comparison measures etc.
You can create a measure like
Sales of prior year products =
var latestYear = MAX( 'Date'[Year])
var priorYearProducts = CALCULATETABLE( VALUES('Orders'[Code]), 'Date'[Year] = latestYear - 1)
return CALCULATE([Sales Amount], priorYearProducts)
and you can build similar logic into comparison measures etc.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
27 | |
24 | |
14 | |
9 |
User | Count |
---|---|
77 | |
61 | |
47 | |
17 | |
12 |