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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Rajan_AN
Frequent Visitor

DAX function for Threshold

I need to verify if a particular LWR meets a threshold. I've created a threshold table for this purpose and connected it to Crystal using a performance cell. The workflow should be such that when I select a specific LWR ID in the LWR table, it filters the performance cell in Crystal based on the meaningful code, which connects both tables. Then, the filtered performance cell should further filter the threshold and display the minimum threshold in kg and EUR.

I've written a DAX function for this, but I'm not obtaining the count of the number of LWRs meeting the threshold.

Could someone kindly provide assistance with this issues? Thank you. Need Help

 

Rajan_AN_0-1710344435021.png

 

Threshold_Meets =
VAR ActualRevenue = SUM('LWR'[Incremental Revenue EUR])
VAR ActualVolume = SUM('LWR'[Incremental Volume])
VAR SelectedArea = SELECTEDVALUE(CRYSTAL[Performance Cell])
VAR SelectedYear = SELECTEDVALUE('Date Table'[Year])
VAR ThresholdRevenue =
    CALCULATE(
        MAX('Threshold'[Threshold-Euro]),
        'Threshold'[E-CO-PCU-A: Performance Cell L2] = SelectedArea
    )
VAR ThresholdVolume =
    CALCULATE(
        MAX('Threshold'[Threshold-KG]),
        'Threshold'[E-CO-PCU-A: Performance Cell L2] = SelectedArea
    )
RETURN
    IF(
        ActualRevenue >= ThresholdRevenue && ActualVolume >= ThresholdVolume,
        "Threshold Met",
        "Threshold Not Met"
    )
1 ACCEPTED SOLUTION
Rajan_AN
Frequent Visitor

Hello Thank you for your response, I was able to figure out the way to get the count. Let me know if you are looking for solution

View solution in original post

2 REPLIES 2
Rajan_AN
Frequent Visitor

Hello Thank you for your response, I was able to figure out the way to get the count. Let me know if you are looking for solution

v-jialongy-msft
Community Support
Community Support

Hi @Rajan_AN 

 

Can you provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors