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.
Eric_Zhang
9 years agoMicrosoft Employee
kalavala wrote:
How to write the formula Power bi in DAX
Sum(Case When (columnname) < 10 Then 1 Else 0 End) Over (Partition By ColumnName)
Besides Reid_Havens's solution, or a more intuitive approach.
Measure = SUMX ( Table1, SWITCH ( TRUE (), Table1[Column1] < 10, 1, 0 ) )