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

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.

Reply
Anonymous
Not applicable

Measure in Percentage disappear my visual

Hi again experts,
i have a issue with a measure 

this measure  (fig 1) show me a result that i need but i need now the percentage by month (that is not a date)
so i created the new measure that is show in (fig 2) but that makes my visual disappear and even using the option 

(percentage of grand total) makes the same effect but when i do something like the measure in (fig 3) the visual go back and show percentage as a normal way.

i need to be show the percentage by MES(month) so ENERO(january) will have all his values to 100% and so for the other months FEBRERO(February), MARZO(march)

thanks you all.

Sin título.pngSin título1.pngSin título2.png

1 ACCEPTED SOLUTION


@Anonymous wrote:

i upload my db with fake data i need calculate the percentage by MES so the first column enero
would be yellow 71% black 8% and  21% gray.


How are you calculating those percentages? When I look at the raw figures for [Analisis_Masivol] I see

 

Yellow 502  (70.4%)

Black    61   (8.6%)

Gray   150   (21.0%)

 

Which rounds to 70%, 8% and 21%. Not 70% 9% and 20% - I don't know why the percentages are slightly different.

 

However the following formula produces the above percentages

 

Particip_Analisis = DIVIDE([Analisis_Masivo1],
SUMX(ALLSELECTED(BBDDALTA[MATRIZ RC (grupos)]), [Analisis_Masivo1]))

View solution in original post

6 REPLIES 6
d_gosbell
Super User
Super User

Have you tried changing your call to ALLEXCEPT to include both the "MES" and "MATRIZ RC (grupos)" columns?

 

eg  ALLEXCEPT(BBDDALTA ; BBDDALTA[MES] ; BBDDALTA[MATRIZ RC (grupos)] )

 

If you just do the ALLEXCEPT with the MES column it strips the filter off the MATRIZ RC (grupos) column which means that the SELECTEDVALUE you use in your [Analisis_Masivol] measure will fail. I'm not complete sure I understand your issue, but if my guess here is correct this might fix it. 

 

However sometime ALLEXCEPT strips off too much of the filter context (as it affects related tables) so sometimes the following pattern using ALL and VALUES needs to be used.

 

ALL(BBDDALTA)  ; VALUES( BBDDALTA[MES] ) ; VALUES( BBDDALTA[MATRIZ RC (grupos)] )

 

Anonymous
Not applicable

Hi @d_gosbell i actually test with allexcept(with MES) and won't work all the columns show 100% in all the divisions and with values happend the same what i need to be show is the percentage by column Mes so for example Enero would be 21% gray 9% Black 70% yellow. Thx 4 the attetion.

Ok, it's pretty hard to understand what is going on without access to some data. Are you able to post a few rows of sample data and the expected output from that sample data. This does not have to be real data, a small set of data with 10-20 rows and a handful of columns (enought to illustrate your issue) would be ideal.

Anonymous
Not applicable

hi @d_gosbell

i upload my db with fake data i need calculate the percentage by MES so the first column enero
would be yellow 71% black 8% and  21% gray.
  https://drive.google.com/open?id=1cocRKbldBxZD_Km8iLcPLmld4pbA9KvO

please i need help on this.


@Anonymous wrote:

i upload my db with fake data i need calculate the percentage by MES so the first column enero
would be yellow 71% black 8% and  21% gray.


How are you calculating those percentages? When I look at the raw figures for [Analisis_Masivol] I see

 

Yellow 502  (70.4%)

Black    61   (8.6%)

Gray   150   (21.0%)

 

Which rounds to 70%, 8% and 21%. Not 70% 9% and 20% - I don't know why the percentages are slightly different.

 

However the following formula produces the above percentages

 

Particip_Analisis = DIVIDE([Analisis_Masivo1],
SUMX(ALLSELECTED(BBDDALTA[MATRIZ RC (grupos)]), [Analisis_Masivo1]))
Anonymous
Not applicable

@d_gosbell  thanks that´s exactly what i needed i calculate the percentage with a calculator xD but i forgot to round the decimals. 
Greetings from Perú.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.