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
mihaita_baro
Helper II
Helper II

Use Slicer in DAX formula to calculate

Hi

 

I have 3 tables which i merged them and looks like below picture.

 

I want to show for each Caseload how many KPI4.LPTID, KPI5.LPTID and KPI6.LPTID are for a specific month.

 

I've created a Date table as well and i want to write a formula that calculate what i said.

 

For example if i select April in my Slicer (based on Date Table) i want to see how mani KPI4, KPI5 and KPi6 for each CaseLoad

 

I was trying like : 

KPI5Measure = COUNT(Merge2[RawDataKPI5.LPTID]) - and here i wanna say if slicer is selected aprile=KPI5EndDate to do the calculation
 
Or if you guys have an easier version would highly appreciate

 

mihaita_baro_0-1622048608115.png

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@mihaita_baro 

You also need to count by CaseLoad so you can try following measure, then select month in the slicer or filter.

 

KPI5Measure = Calculate(COUNT(Merge2[RawDataKPI5.LPTID]), Filter(Allselected(table), [Referral_CaseLoad]=MAX([Referral_CaseLoad]))

 

Just change the kpi column for KPI4 and KPI6. 

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@mihaita_baro 

You also need to count by CaseLoad so you can try following measure, then select month in the slicer or filter.

 

KPI5Measure = Calculate(COUNT(Merge2[RawDataKPI5.LPTID]), Filter(Allselected(table), [Referral_CaseLoad]=MAX([Referral_CaseLoad]))

 

Just change the kpi column for KPI4 and KPI6. 

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

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.