Forum Discussion
Percentile
- 4 years ago
Ok. That is different from what I had understood earlier. See it all at work in the attached file:
NewMeasure = VAR total_ = CALCULATE ( COUNT ( Table1[Estancia Fábrica] ), ALL ( Table1 ) ) VAR currentEst_ = SELECTEDVALUE ( Table1[Estancia Fábrica], total_ ) VAR cumul_ = CALCULATE ( COUNT ( Table1[Estancia Fábrica] ), Table1[Estancia Fábrica] <= currentEst_, ALL ( Table1 ) ) RETURN DIVIDE ( cumul_, total_ )Please accept the solution when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Hi MTrullàs
I assume you're looking for a calculated column. If so, create this and format as %:
NewCol_ =
VAR total_ = CALCULATE ( SUM ( HIFA[Num_Coches] ), ALL ( HIFA ) )
VAR cumul_ =
CALCULATE (
SUM ( HIFA[Num_Coches] ),
HIFA[Estancia Fábrica] <= EARLIER ( HIFA[Estancia Fábrica] ),
ALL ( HIFA )
)
RETURN
DIVIDE ( cumul_, total_ )
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hello,
Thanks a lot for the quick answer,
No, I'm lookin' for a metric.I need a measure, because I want to build a board like this:
Before, I have a table with different rows, therefore, I made a cluster with the same "Estancia Fábrica", so I need a metric.
Thank you again, for your help
- AlB4 years ago
Community Champion
See if this measure works. It should be in a visual with HIFA[Estancia fábrica] on the rows, like the ones you show:
NewMeasure_ = VAR total_ = CALCULATE ( SUM ( HIFA[Num_Coches] ), ALL ( HIFA ) ) VAR currentEst_ = SELECTEDVALUE ( HIFA[Estancia Fábrica] ) VAR cumul_ = CALCULATE ( SUM ( HIFA[Num_Coches] ), HIFA[Estancia Fábrica] <= currentEst_, ALL ( HIFA ) ) RETURN DIVIDE ( cumul_, total_ )Please accept the solution when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
- MTrullàs4 years ago
Helper III
Thank you so much,
Now the measure works, I mean it gives me a result, but the result is not what I'm looking for.I don't know what the NewMeasure_is specifically
I the result that I expected is that the excel shows:- AlB4 years ago
Community Champion
hmm... I can't see what might be going wrong
Can you share the main table? Or an extract of it, with the expected result. So that I can run it on my side and see where the problem is coming from
Please accept the solution when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.