Forum Discussion
Help with Clustered Column Chart
Set Date 2015 = CALCULATE(COUNTA('Meters Sold vs Set'[Set Date]), 'Date Dimension'[Year] = 2015)
or try should give you same result
Set Date 2015 = CALCULATE(COUNTROWS('Meters Sold vs Set'), 'Date Dimension'[Year] = 2015)
Thanks Sean for your help on this.
I had changed the formular. However, I seam to have two identical lines. In other words, the fomular does not seem to alter my result. Would you please take anther look at the screen below.
here is my fomular: Set Date 2015 = CALCULATE(COUNTA('Meters Sold vs Set'[Set Date]), 'DateKey'[Year] = 2015)
Thanks Sean
- Sean10 years agoCommunity Champion
AndrewDang You have 2 options (each has its advantages)
OPTION 1
Create another Measure using the same formula just change 2015 to 2016
Set Date 2016 = ...... just change 2016 at the end
OPTON 2
You can also create (CY- Current Year and PY - Previous Year) - WATCH the results if you have Year Slicer though !!!
Set Date PY = CALCULATE(COUNTA('Meters Sold vs Set'[Set Date]), FILTER('DateKey', 'DateKey'[Year] = MAX('DateKey'[Year])-1))
Set Date CY = CALCULATE(COUNTA('Meters Sold vs Set'[Set Date]), FILTER('DateKey', 'DateKey'[Year] = MAX('DateKey'[Year])))
Let me know if this works!
- AndrewDang10 years agoHelper IV
I have tried both options but my line does not seem to change at all. i am not sure if my Date Dimension table is off? I have followed this tutorial to create my date table:
http://community.powerbi.com/t5/Desktop/How-do-i-create-a-date-table/m-p/23896/highlight/true#M7605
No manater what year I changed to, it does not seem to change the result at all.
- Sean10 years agoCommunity Champion
Do you get the correct result form the Measures I gave you if you put in just a Table?
And post a screenshot so I can see what you have in the Vizualizations and Fields area?