Forum Discussion
kalavala
9 years agoFrequent Visitor
DAX
How to write the formula Power bi in DAX Sum(Case When (columnname) < 10 Then 1 Else 0 End) Over (Partition By ColumnName)
- 9 years ago
Hi there,
So the EARLIER function is grouping by values in a specified column, so those column names need to be the same, in the example below you're using ColumnName1 against ColumnName, those should match and then the query should work.
kalavala
9 years agoFrequent Visitor
Hello Havens,
the below calcuation part columnname 1
DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.
please help me
=
CALCULATE (
COUNTA ( [ColumnName] ),
[ColumnName] < 10,
FILTER ( TableName, [ColumnName1] = EARLIER ( [ColumnName] ) )
)
Reid_Havens
9 years agoMost Valuable Professional
Hi there,
So the EARLIER function is grouping by values in a specified column, so those column names need to be the same, in the example below you're using ColumnName1 against ColumnName, those should match and then the query should work.