Forum Discussion
Help with Clustered Column Chart
Thanks MattAllington for your help on this. I really appreciate it.
I have created a date dimension table to use in the measure. I however run into another error message: "A single value for column 'Set Date' in table 'Meters Sold vs Set' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
I am counting a number of occurance in the Set Date column as a measure here. This field is a date field (mm/dd/yyyy). I am wondering if we need a countable field to be referenced here?
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)
- AndrewDang10 years agoHelper IV
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.