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
JohnJairoV
Helper I
Helper I

Help with Percentage with conditions 2 - DAX formula

Some days ago I start a query about Help Percentage with conditions in this link:

 

https://community.powerbi.com/t5/Desktop/Help-with-Percentage-with-conditions-DAX-formula/m-p/83715#...

 

Now, I have a new issue derivated from the first query.

 

My data (into Excel) looks like this:

 

TituloMesSectorItemvalor
LibrosEneroSector 1Libro 130
LibrosEneroSector 1Libro 250
LibrosEneroSector 2Libro 320
LibrosEneroSector 1Libro 450
LibrosEneroSector 1Libro 540
LibrosEneroSector 1Libro 620
Video JuegosEneroSector 1Video Juego 170
Video JuegosEneroSector 1Video Juego 250
Video JuegosEneroSector 2Video Juego 340
MusicaEneroSector 1CD115
MusicaEneroSector 2CD210
MusicaEneroSector 1CD320
MusicaEneroSector 2CD450
LibrosFebreroSector 1Libro 110
LibrosFebreroSector 2Libro 215
LibrosFebreroSector 1Libro 320
LibrosFebreroSector 2Libro 425
LibrosFebreroSector 1Libro 532
LibrosFebreroSector 2Libro 620
Video JuegosFebreroSector 1Video Juego 170
Video JuegosFebreroSector 1Video Juego 250
Video JuegosFebreroSector 2Video Juego 340
MusicaFebreroSector 1CD115
MusicaFebreroSector 2CD210
MusicaFebreroSector 2CD320
MusicaFebreroSector 2CD450

 

And with this measure (named medida 1):

 

=DIVIDE (
    SUM ( Tabla1[valor] );
    CALCULATE(
        SUM ( Tabla1[valor] );
        ALLSELECTED ( ); Tabla1[Titulo] = "Libros" 
    );
    0
)

Try to calculate the percentage based on Libros title.  I got this results (like picture):

 

New Issue.png

 

The results that I want to get is at the right of Pivot Table, the "must be:" part.  In blue is the result that I want with DAX formula, and Yellow is the description of the formulae used for calculate this percentages.

 

Any help must be apreciated.  Blessings!

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Okay I hope I get this right the first time Smiley Happy

 

Medida 1 =
DIVIDE (
    SUM ( Tabla1[valor] );
    CALCULATE (
        SUM ( Tabla1[valor] );
        Tabla1[Titulo] = "Libros";
        ALLSELECTED ( Tabla1[Item] )
    );
    0
)

 

2016-11-02 - % Of Item Total.png 

View solution in original post

2 REPLIES 2
Sean
Community Champion
Community Champion

Okay I hope I get this right the first time Smiley Happy

 

Medida 1 =
DIVIDE (
    SUM ( Tabla1[valor] );
    CALCULATE (
        SUM ( Tabla1[valor] );
        Tabla1[Titulo] = "Libros";
        ALLSELECTED ( Tabla1[Item] )
    );
    0
)

 

2016-11-02 - % Of Item Total.png 

Yeah! Great! Really Thx for your help.  This time all good! Blessings!

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.