Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I'm creating a report and would need to give the users the option to include or exclude sub-projects in the project count.
The data is something like:
Project Sub-project
1004
1004 001
1005
1006
If selecting to include sub-project, I would use count, the result would be 4.
If selecting no to include sub-projects, I would use count distinct, the result would be 3
I've tried creating a mesure, but I realized that a measure can't be used to filter at the report level.
Is there a way to accomplish this, other than creating a dupplicate page and assign the value as needed.
Thank you for your help
Solved! Go to Solution.
@omelo ,You need to switch between two measure based on isfiltered
measure =
var _tab = summarize(Table, Table[project], Table[Project Sub-project])
return
countx(_tab, Table[project])
measure 1 = distinctcount(Table[project])
final measure = if(isfiltered (Table[Project Sub-project]), [measure], [measure1])
@omelo ,You need to switch between two measure based on isfiltered
measure =
var _tab = summarize(Table, Table[project], Table[Project Sub-project])
return
countx(_tab, Table[project])
measure 1 = distinctcount(Table[project])
final measure = if(isfiltered (Table[Project Sub-project]), [measure], [measure1])
Hi,
I was not familiar with the switch function but thanks to your response I was able to find a video that gave me the details that I needed.
I'm including the link in case someone else is looking to do the same.
Dynamically change the information within a visual via a slicer - oxcrx34285 (powerbi.com)
Again, many thanks for your response
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
69 |
User | Count |
---|---|
226 | |
129 | |
119 | |
84 | |
77 |