Ratio in chart vs ratio from measure ( how to achieve the same value ? )

Hi all,

10.02.23 forum.pbix (40.9 KB)

I am trying to create a measure that gives me outcome the same as I have in my chart:

Could you please, help me to understand what I am doing wrong? Which average value is correct and why?

Grateful as always,

Iwona

Hi @Iwona,

If your ratio should reflect [Sum of Holiday] / [Count of Employee ID] than the table avg reflects the accurate result. For a card you’d need to retrieve the full ‘visible’ context.

Try someting like this.

Garage Ratio v2 = 
VAR c =
    ADDCOLUMNS(
        SUMMARIZE( 'forum 10 02 2023', 'forum 10 02 2023'[Location], 'forum 10 02 2023'[Holiday ], 'forum 10 02 2023'[Employee ID] ),
        "Total Holiday", SUM( 'forum 10 02 2023'[Holiday ] ),
        "Total Employee", DISTINCTCOUNT( 'forum 10 02 2023'[Employee ID] )
    )
Return 

DIVIDE( SUMX( c, [Total Holiday] ), SUMX( c, [Total Employee] ), 0 )

Hi @Melissa
In my original dataset I have Location, Holiday, Employee ID columns in different tables :frowning:
Is there any possibility to make this measure work ?

Many thanks,

Iwona

@Iwona this forum is full of volunteers that give up their own time to help others, as a courtesy give some thought before posting a question. Make sure to always provide a mock up of what you are trying to achieve AND as much detail as possible.

I am confident we can resolve this BUT as your sample currently doesn’t resamble your actual model, I suggest you update it before asking further assistance. Don’t expect others to do that for you.

Thanks in advance.

3 Likes

@Melissa

I would like to apologize for my rude behavior towards you and all the wonderful people who sacrifice their own time to help people like me.
I understand and I acknowledge the fact that my posting questions are incomplete and unfair/disrespectful to you. I feel embarrassed for my actions as I appreciate your all support and help in my daily life.
I am thankful that I can be a part of this community and learn from you.
I am assuring you of not seeing anything like that in the future. I truly hope you forgive me.

Regards,

Iwona

1 Like