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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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.@v-yiruan-msft 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.