Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I use this formula
here's the formula used ( thanks community!!) to get the [Répartition] part
Répartition = VAR SummaryTable =
ADDCOLUMNS (
SUMMARIZE (
'Tableau Dispatch',
'Base Article'[CODE ARTICLE],
'Tableau Dispatch'[CODE DEPOT]
),
"@val",
VAR QTETOT = [1-Total articles en stock]
VAR QTETOTDEPOT =
CALCULATE (
[1-Total articles en stock],
REMOVEFILTERS ( 'Tableau Dispatch'[CODE DEPOT] )
)
RETURN
DIVIDE (
CALCULATE ( QTETOTDEPOT, ALL ( 'Tableau Dispatch'[CODE DEPOT] ) ),
[Total dépots],
BLANK ()
)
)
RETURN
SUMX ( SummaryTable, [@val] )
Solved! Go to Solution.
HI guys,
Thanks to @johnt75
I Used
partie entière répartition =
VAR SummaryTable =
ADDCOLUMNS (
SUMMARIZE (
'Tableau Dispatch',
'Base Article'[CODE ARTICLE],
'Tableau Dispatch'[CODE DEPOT]
),
"@val",
VAR QTETOT = [1-Total articles en stock]
VAR QTETOTDEPOT =
CALCULATE (
[1-Total articles en stock],
REMOVEFILTERS ( 'Tableau Dispatch'[CODE DEPOT] )
)
RETURN
DIVIDE (
CALCULATE ( QTETOTDEPOT, ALL ( 'Tableau Dispatch'[CODE DEPOT] ) ),
[Total dépots],
BLANK ()
)
)
RETURN
SUMX ( SummaryTable, TRUNC([@val]) )
Seriously guys, Thank you so much !
HI guys,
Thanks to @johnt75
I Used
partie entière répartition =
VAR SummaryTable =
ADDCOLUMNS (
SUMMARIZE (
'Tableau Dispatch',
'Base Article'[CODE ARTICLE],
'Tableau Dispatch'[CODE DEPOT]
),
"@val",
VAR QTETOT = [1-Total articles en stock]
VAR QTETOTDEPOT =
CALCULATE (
[1-Total articles en stock],
REMOVEFILTERS ( 'Tableau Dispatch'[CODE DEPOT] )
)
RETURN
DIVIDE (
CALCULATE ( QTETOTDEPOT, ALL ( 'Tableau Dispatch'[CODE DEPOT] ) ),
[Total dépots],
BLANK ()
)
)
RETURN
SUMX ( SummaryTable, TRUNC([@val]) )
Seriously guys, Thank you so much !
Hi @SebSchoon1 ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _table=
SUMMARIZE('Table','Table'[Index],"Value",[partie entiere repartition])
return
IF(
HASONEVALUE('Table'[Index]),[partie entiere repartition],SUMX(_table,[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Do another SUMX, this time over the TRUNC function. Remember that in a table visual measures are calculated twice, once for each row-column , and once for the row total.
If you want further help please provide sanitized sample data that fully covers your issue.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |