Forum Discussion
MadisMerk
7 years agoHelper I
Measure question
Can you help me with a measure? Let us imagine I have this table as a starting point Vehicle number Customer name Vehicle type Amount 550 RLA Toomas New 1 885 ASS ...
- 7 years ago
Try this MEASURE
Measure = IF ( COUNTROWS ( VALUES ( TableName[Vehicle type] ) ) = 1 && CALCULATE ( DISTINCTCOUNT ( TableName[Vehicle type] ), TableName[Vehicle type] = "Used" ) = 1, COUNT ( TableName[Vehicle type] ) )
MattAllington
7 years agoCommunity Champion
It is not easy to do this with 1 table. You should load a customer dimension table too, containing all unique customers. Join this to your data table with a 1 to many relationship. Then put the customer from the customer table into the rows of a matrix. The measures would be
Total new = calculate(sum(datatable[amount]),datatable[vehicle type]=“new”)
Total but only customers with no new vehicles =calculate(sum(datatable[amount]),filter(customertable,[total new]=0))
i haven’t tested this, but it think it is correct.