Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I have a control page which contained 10 different filters, the filter on this page can control all the 4 tabs created in Power BI(This means, once I clicked filter A and filter B on the control tab, the entire report will only show the data of the intersection of fiter A and B).
What I would like to do is to create a measure - DYNAMIC MEASURE to on each tab, this will be a warning to tell the user which filter has been applied at the control filter page. For example, in the control page , I select 15-20 year old under age filter and female under gender firter, the text i would like to show is "This page is showing people who are aged 15-20 year old and age female" .Please note we have 10 filters, we may only select 1 filter , we may select mutiple, we may not select anything, this means some of the filter may show as default.
Any help would be helpful. Thank you!
pls try this
Measure =
VAR _counta=calculate(distinctcount('Table'[Age]),all('Table'[Age]))
VAR _countb=CALCULATE(DISTINCTCOUNT('Table (2)'[Gender]),all('Table (2)'[Gender]))
VAR _display=CONCATENATEX('Table','Table'[Age],",")
return if(DISTINCTCOUNT('Table'[Age])=_counta ,"Please do not select all for age",if(DISTINCTCOUNT('Table (2)'[Gender])=_countb,"Please do not select all for Gender", "This page is showing people who are aged "&_display & " year old and age" & max('Table (2)'[Gender])))
pls see the attachment below
Proud to be a Super User!
@ryan_mayu Thank you so much Ryan for the quick reply,. I think this solve my majority question, a quick follow up question, I saw the previous was showing "Please do not select all for AAAA".
Ideally, if we select anything(any filter), I would like to show "
"This page is showing people who are aged "&_display & " year old and age" & max('Table (2)'[Gender])))
below. If no filter was selected at all, I would like to show, "this page is showing all demographic population". Any thought of how to adjust the dax? The above is showing 2 filter, if I have 10 filter, and the 10 filter, some of then are coming from 1 table, some of them from different table, some of them are calculated columns, how should be apply that? Thank you so much again for your help!
is this what you want?
Measure =
VAR _counta=calculate(distinctcount('Table'[Age]),all('Table'[Age]))
VAR _countb=CALCULATE(DISTINCTCOUNT('Table (2)'[Gender]),all('Table (2)'[Gender]))
VAR _display=CONCATENATEX('Table','Table'[Age],",")
return if(DISTINCTCOUNT('Table'[Age])=_counta ,"this page is showing all demographic population",if(DISTINCTCOUNT('Table (2)'[Gender])=_countb,"Please do not select all for Gender", "This page is showing people who are aged "&_display & " year old and age" & max('Table (2)'[Gender])))
if you have more filters, you can use the similar way. pls share the sample data and expected output ,so that we can provide you the solution.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |