Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Dear All,
For a table with this layout (as mentioned below) I would like to calculate the percentage based on the subtotal.
In this example:
Subtotal of first company is 7288, with a break down to 2775 and 4514
Subtotal of second company is 4809, with a break down to 3431 and 1378
I want to come to the following percentages:
First company:
* Subtotal: 100%
* Eerder dan 13.00 uur: 38%
* Later dan 13.00 uur: 62%
Second company:
* Subtotal: 100%
* Eerder dan 13.00 uur: 71%
* Later dan 13.00 uur: 29%
A DAX or any oher solution will be helpful, to create a separate column with a percentage.
Kind regards
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below, and I hope the below measure can help to modify and apply it to your data model.
SubCat ratio: =
IF (
ISINSCOPE ( SubCategory[Category] ),
DIVIDE (
Data[Total value:],
CALCULATE ( Data[Total value:], ALLEXCEPT ( Data, SubCategory[Category] ) )
)
)
Hi @Anonymous ,
Is your problem solved?? If so, Would you mind accept the helpful replies as solutions?
If your values in the matrix are columns, you still need a SUM function:
Percentage =
DIVIDE (
'Table'[Value],
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Company] ) )
)
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Is your problem solved?? If so, Would you mind accept the helpful replies as solutions?
If your values in the matrix are columns, you still need a SUM function:
Percentage =
DIVIDE (
'Table'[Value],
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Company] ) )
)
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below, and I hope the below measure can help to modify and apply it to your data model.
SubCat ratio: =
IF (
ISINSCOPE ( SubCategory[Category] ),
DIVIDE (
Data[Total value:],
CALCULATE ( Data[Total value:], ALLEXCEPT ( Data, SubCategory[Category] ) )
)
)
This looks like it's exactly the solution I've been looking for, for several days. Thanks so much for providing the file. I intend to try modifying the code for my needs shortly.
Super it worked, kudos to you, thanks.