cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MiquelZelich
Frequent Visitor

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

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!




@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
Microsoft
Microsoft

Hi @MiquelZelich 

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.

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors