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.
I have my data set more or less structured in the following where I have these columns:
A datetime column (date format)
a yearMonth(i,e YYYYMM) column (number format)
value column (number format).
I need to create a bar graph where with 3 bars:
a 2016 bar that sums up the value at 201612 (never change)
a 2017 bar that sums up the value at 201712 (never change)
a 2018 bar that will always sum the previous months values So in February 2018, it will sum up the value of Jan 2018
right now, I created an additional column that has a "TRUE" indicator if YYYYMM = (201612 or 201712), and I can use that as a filter....but I dont know how to make the 2018 bar "dynamic".
I thought about creating yet another "PreviousMonth" column that looks outputs the current YearMonth as a number format, roll that back one month, and if (YYYMM = "PreviousMonth", TRUE, FALSE), but I dont know how to make that work.
How would I go about doing this?
Solved! Go to Solution.
Why not a measure like:
2018 = CALCULATE(SUM(Table[Value]),FILTER(Table,[yearMonth] > 201800 && [yearMonth] < MAX(Table[yearMonth)-1))
Something like that.
Why not a measure like:
2018 = CALCULATE(SUM(Table[Value]),FILTER(Table,[yearMonth] > 201800 && [yearMonth] < MAX(Table[yearMonth)-1))
Something like that.
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 |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |