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

DAX problem when adding a measure in matrix it displays multiple rows

I have a matrix where with some values (name of a program and professors) in Rows and some measures in Values. The problem is that when I try to add a new measure based on two other measures it displays multiple rows that I don't want. This is my case:

tabla.PNG

 

Then if I add the new measure that is based on Accepted Class Time and Accepted Standard (75 min) it displays all professors even if they didn't make that program.tabla2.PNG

 

The measures that I am using are:

Accepted Class Time = 
SUMX(SESIONCURSO; SESIONCURSO[MINUTOS] * SESIONCURSO[CONFIRMADA] * SESIONCURSO[Role Accepted]) 
Accepted Standard (75 min) = 
ROUND(
    DIVIDE([Accepted Class Time]; 75);
    0
    )
Unique = 
IF(
    [Accepted Class Time] >= 15 && [Accepted Standard (75 min)] = 0;
    1;0
)
Unique Session = 
CALCULATE(
    [Unique];
    ALLEXCEPT(I4_PS_PROGRAM;I4_PS_PROGRAM[NOMBRE]);
    ALLEXCEPT(PROFESOR;PROFESOR[Apellido_Nombre])
)

Programs and professors are in separte tables. I want to add Unique Session measure but only to the rows visible in the first table. 

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

I have the same problem using unique measure.

 

At the end I've solved it by using the measure unique changing the "0" result by "Blank()"

Unique = 
IF(
    [Accepted Class Time] >= 15 && [Accepted Standard (75 min)] = 0;
    1;BLANK()
)

 

View solution in original post

5 REPLIES 5
AkhilAshok
Solution Sage
Solution Sage

Can you try Unique measure this way:

 

Unique =
IF (
    NOT ( ISEMPTY ( SESIONCURSO ) );
    IF ( [Accepted Class Time] >= 15 && [Accepted Standard (75 min)] = 0; 1; 0 )
)
AnthonyTilley
Solution Sage
Solution Sage

Would you beable to refrence one of the other measures that is showing blank and if they are blank return Blank instead this should remove all the extra lines from your visual where the you do not want a result to be shown 

 

For example 

 

Unique Session =
IF(PlannedTimeSlot = Blank(),BLank(),
CALCULATE(
[Unique];
ALLEXCEPT(I4_PS_PROGRAM;I4_PS_PROGRAM[NOMBRE]);
ALLEXCEPT(PROFESOR;PROFESOR[Apellido_Nombre])
))




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@AnthonyTilley
@mwegener 
Hi

I am trying to use a DAXmeasure in Matrix report Power BI, but its giving me wrong column total but correct row total. Can you please recommend me is it possible to fix this or it has to be only row total. 

I have provided the screenshort of my measure, report and expected output. 

Report

ReportReport
I am getting above output as my measure is behaving as below:

 

BEHAVIOR ( WRONG)BEHAVIOR ( WRONG)
------------------------------------------------------------------------------------------------------------------------
MY ACTUAL MEASURE

MeasureMeasure

 

----------------------------------------------------------------------------------------------------------------------------------------

Expected Output

Expected OutputExpected Output





v-cherch-msft
Employee
Employee

Hi @Anonymous 

Why not drag the Unique to the visual?It seems there's no need to use Unique Session measure.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

 

I have the same problem using unique measure.

 

At the end I've solved it by using the measure unique changing the "0" result by "Blank()"

Unique = 
IF(
    [Accepted Class Time] >= 15 && [Accepted Standard (75 min)] = 0;
    1;BLANK()
)

 

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.