Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Need Help: Assigning Revenue Value to All Categories Except 'Revenue' in Power BI

I have multiple categories with values, and my requirement is to display the "Revenue Revenue OWNER: Finance" value for all other categories. I tried using this DAX, but it is returning null values. How can I achieve this task? Can anyone help me with this?

RevenueValue = CALCULATE(SUM('z - Bowler Charts'[Metric]),FILTER(ALL('KPI Master'),'KPI Master'[KPI Description] = "Revenue Revenue OWNER: Finance"))


 AdjustedMetric =
IF(
SELECTEDVALUE('KPI Master'[KPI Description]) <> "Revenue Revenue OWNER: Finance",
[RevenueValue],
SUM('z - Bowler Charts'[Metric]
))
I checked the relationship between the tables, and everything is set up correctly with a many-to-one relationship based on the ID.

  • Hi Anonymous ,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    I have prepared a sample dataset and created the necessary measures to replicate your scenario. The measures used are listed below, and the results align with the expected outcome.Please refer to the screenshot below for your reference, and also attached pbix file.

     
    AdjustedMetric =
    VAR RevenueValue =
        CALCULATE(
            SUM('z - Bowler Charts'[Metric]),
            FILTER(
                ALL('KPI Master'),
                'KPI Master'[KPI Description] = "Revenue Revenue OWNER: Finance"
            )
        )
    RETURN
    IF (
        SELECTEDVALUE('KPI Master'[KPI Description]) = "Revenue Revenue OWNER: Finance",
        SUM('z - Bowler Charts'[Metric]),
        RevenueValue
    )

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thank you!!

4 Replies

  • v-sathmakuri's avatar
    v-sathmakuri
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    I have prepared a sample dataset and created the necessary measures to replicate your scenario. The measures used are listed below, and the results align with the expected outcome.Please refer to the screenshot below for your reference, and also attached pbix file.

     
    AdjustedMetric =
    VAR RevenueValue =
        CALCULATE(
            SUM('z - Bowler Charts'[Metric]),
            FILTER(
                ALL('KPI Master'),
                'KPI Master'[KPI Description] = "Revenue Revenue OWNER: Finance"
            )
        )
    RETURN
    IF (
        SELECTEDVALUE('KPI Master'[KPI Description]) = "Revenue Revenue OWNER: Finance",
        SUM('z - Bowler Charts'[Metric]),
        RevenueValue
    )

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thank you!!

  • v-sathmakuri's avatar
    v-sathmakuri
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

     

    Thank you!!

  • v-sathmakuri's avatar
    v-sathmakuri
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

     

    Thank you!!

  • v-sathmakuri's avatar
    v-sathmakuri
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    I hope this information provided is helpful. Feel free to reach out if you have any further questions or would like to discuss this in more detail. If responses provided answers your question, please accept it as a solution so other community members with similar problems can find a solution faster.

     

    Thank you!!