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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PeterPain
Regular Visitor

Beginner - Problem with the result of a simple measurement

Hi guys - i just started with PowerBI Desktop and watched a couple of tutorials.

I created an "easy" measurement to calculate a %-Value from two-KPis. 

Rate = DIVIDE('KPI'[Loss AI],'KPI'[Adreq.])
The result into a table is correct as long i choose "Rate = not summarize":
PeterPain_1-1704023779066.png

 

The Problem is -> i want just one result and if i choose "summary" the calculation is wrong.

What is the problem to get the right result on the needed aggregation level?

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @PeterPain 

You can try the following measure

Rate =
VAR a =
    SUMX (
        FILTER (
            ALLSELECTED ( 'KPI' ),
            [Datum]
                IN VALUES ( 'KPI'[Datum] )
                    && [SEITE] IN VALUES ( 'KPI'[SEITE] )
        ),
        [Loss AI]
    )
VAR b =
    SUMX (
        FILTER (
            ALLSELECTED ( 'KPI' ),
            [Datum]
                IN VALUES ( 'KPI'[Datum] )
                    && [SEITE] IN VALUES ( 'KPI'[SEITE] )
        ),
        [Adreq.]
    )
RETURN
    DIVIDE ( a, b )

Best Regards!

Yolo Zhu

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

View solution in original post

4 REPLIES 4
v-xinruzhu-msft
Community Support
Community Support

Hi @PeterPain 

You can try the following measure

Rate =
VAR a =
    SUMX (
        FILTER (
            ALLSELECTED ( 'KPI' ),
            [Datum]
                IN VALUES ( 'KPI'[Datum] )
                    && [SEITE] IN VALUES ( 'KPI'[SEITE] )
        ),
        [Loss AI]
    )
VAR b =
    SUMX (
        FILTER (
            ALLSELECTED ( 'KPI' ),
            [Datum]
                IN VALUES ( 'KPI'[Datum] )
                    && [SEITE] IN VALUES ( 'KPI'[SEITE] )
        ),
        [Adreq.]
    )
RETURN
    DIVIDE ( a, b )

Best Regards!

Yolo Zhu

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

PeterPain
Regular Visitor

Hi and thx for your answer. "Rate" is a measure already 😊

Hello @PeterPain ,

 

try converting the table visual into a matrix and have the rate in the values and the other fields as rows.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Fowmy
Super User
Super User

@PeterPain 

Create a meaure instead of column for your calcualtion


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.