Forum Discussion
Distinc Count depending on filters
- Anonymous8 years ago
Well, its done by the measure:
Measure = IF (ISFILTERED([Column8]);IF(HASONEFILTER([Column8]);VALUES(Table[Column8]);"Multiple Departments");"Nothing selected")
Explaination:
if (some selection on slicer) then
if (num selections) == 1 then
return columnNameValueSelected
else (num selections >1)
return "Multiple Departments"
else
"Nothing selected"
Attach the measure into a Card and use it as Title.
Regards.
--
Javi
To check if one filter is active on a single column you can use HASONEFILTER() https://msdn.microsoft.com/en-us/library/gg492135.aspx
If I understood the question, you want some like:
IF (ISFILTERED([column]);IF(HASONEFILTER([column]);"One Department";"Multiple Departments");"do some")
Hi,
thanks for your input, but I think it's not the case
What I ment is I need to count how many departments the query have retrieved and then if there is more than one display "Multiple" or display the department name column [DepName] if there is only one.
But in the case when there are more than one and the users filter it using ans slicer the filed should be updated and display the single value.
I don't know if I explained well.
Cheers
- Anonymous8 years agoNot applicable
Well, its done by the measure:
Measure = IF (ISFILTERED([Column8]);IF(HASONEFILTER([Column8]);VALUES(Table[Column8]);"Multiple Departments");"Nothing selected")
Explaination:
if (some selection on slicer) then
if (num selections) == 1 then
return columnNameValueSelected
else (num selections >1)
return "Multiple Departments"
else
"Nothing selected"
Attach the measure into a Card and use it as Title.
Regards.
--
Javi
- Anonymous8 years agoNot applicable
It worked, thank you very much!