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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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