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

Forcing blank values on certain columns in matrix

Hello everyone: I've got a problem in creating a measure for a matrix, and I hope that someone in the community will be able to help me figure it out.
I've got a matrix, on the rows I have several group and two measures for each of them. On the columns I have the months and the years, which the user can select from a slicer.


In this picture is represented the matrix for the years 2017 and 2018.

Cattura.PNG


Now comes the hardest part: how do I "hide" the VARIANCE Value for the minimum year in the matrix (like shown in the picture)?
I've achieved that by writing this measure, but It cannot work, since I use 2017 as a constant value. I would like to make this measure dynamic, getting the minimum value of the selected years. (Eg: if the user selects 2016 and 2017 the VAR cells for the year 2016 should be blank).

 

 
VARIANCE =
VAR __BASELINE_VALUE = [Netto(000)AP]
VAR __VALUE_TO_COMPARE = [Netto(000)]
VAR Netto =
IF(
        NOT ISBLANK(__VALUE_TO_COMPARE);
        DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE; __BASELINE_VALUE)
    )
RETURN
IF(VALUES('inv CalDay'[Anno]) = 2017; BLANK(); Netto)
 
 
4 REPLIES 4
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

If I understand your scenario correctly that you want to show the blank for the minimum year in the matrix?

 

Are the years in Matrix you selected in date slicer?

 

If it is convenient, could you share some data sample which could reproduce your scenario so that I could copy and test.

 

Best  Regards,

Cherry

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

Hello @v-piga-msft,

 

Yes, The selection in the slicer filters the years in the matrix.
I want to show a blank value for the VAR cell in the minimum of the year period. Let's say I select 2016 and 2017 from the slicer: then I would have a matrix with the total values for each month of these years and the variance also for these two years. What I would like to achieve is to hide (force to blank) the variance value for the minimum year in the matrix.


Here is a sample .pbix with the purpose I would like to achieve (but this works only for 2017, as this measure force BLANK values for that specific year)

Sample Report

Hi @Anonymous ,

 

I cannot have access to your Sample pbix.

 

I'm afraid that you'd better share it with your personal OneDrive.

 

Best  Regards,

Cherry

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

I've edited the link.

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.