Forum Discussion
Berl21
Helper III
4 years agoError message for a measure - how to interpret it
Hi, I added a calculated table to my data with values for the previous year, and then tried to add a measure using Switch. This is what I wrote. Range PY = SWITCH(TRUE(),'Leads Amount PY'[...
- 4 years ago
Ok, I got it. The problem was indeed that it was a measure @amitchandak . Beginner mistake 😑
For anyone who reads this, this should be made over a calculated column based on the calculated table (instead of with a measure).
amitchandak
Super User
4 years agoBerl21 , Rae you trying to add a measure in a calculated column?
Berl21
Helper III
4 years agoamitchandak to provide an example, this is the calculated table what I did for all the data (no filter on the year).
Calculated table:
Leads Amount =
SUMMARIZE(
Leads_Table,
Leads_Table[ZH_Account__c],
Leads_Table[Lead_Creation_Date],
"Count of Leads",
[Count Leads]
)
I then inserted this measure:
Range = SWITCH(TRUE(),'Leads Amount'[Count of Leads]<3,"1-3",'Leads Amount'[Count of Leads]<5,"3-5",'Leads Amount'[Count of Leads]<10,"5-10")
The result appears correctly in the final table:
I am now trying to reproduce this with a change to the first step (filter for the previous year). But for some reason that I don't understand, I get this error message about an aggregation issue 😞