Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
timba_bng
New Member

Help adding dynamic filter to run a query against a dataset

Hello, I copied this DAX query from Performance analyzer. I want to be able to be able to make the output dynamic by the  ManagerReport'[name_manager] slicer in the report. The output always pulls all the name_manager column data in the report.@Anonymous gave a solution for something similar but I've been unable to achieve this. Please help.

 

// DAX Query
DEFINE
VAR __DS0Core = 
FILTER(
KEEPFILTERS(
VALUES('ManagerReport'[name_manager])),
AND('ManagerReport'[name_manager]= MAX('ManagerReport'[name_manager])
AND(
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL(
ROLLUPGROUP(
'ManagerReport'[name_manager],
'ManagerReport'[name_employee],
'ManagerReport'[Color Coding],
'ManagerReport'[content_title]
), "IsGrandTotalRowTotal"
),
"MinColor_Coding", IGNORE(CALCULATE(MIN('ManagerReport'[Color Coding])))
)
),
OR(
OR(
OR(
NOT(ISBLANK('ManagerReport'[name_manager])),
NOT(ISBLANK('ManagerReport'[name_employee]))
),
NOT(ISBLANK('ManagerReport'[Color Coding]))
),
NOT(ISBLANK('ManagerReport'[content_title]))
)
)
VAR __DS0PrimaryWindowed = 
TOPN(
502,
__DS0Core,
[IsGrandTotalRowTotal],
0,
'ManagerReport'[name_manager],
1,
'ManagerReport'[name_employee],
1,
'ManagerReport'[Color Coding],
1,
'ManagerReport'[content_title],
1
)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
[IsGrandTotalRowTotal] DESC,
'ManagerReport'[name_manager],
'ManagerReport'[name_employee],
'ManagerReport'[Color Coding],
'ManagerReport'[content_title]

 

1 REPLY 1
ghoshabhijeet
Solution Supplier
Solution Supplier

@timba_bng Thanks for posting your query.

 

Would request you to share some sample data or if possible the pbix file to work on. Thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.