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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
aTChris
Resolver I
Resolver I

Help, measure to calculate if something is occupied breaks slicers

Hi, im struggling to create a measure that will allow me to display if an asset is occupied or not.

I have a list of contracts that related to an asset. I create a table of contracts per month using a function so that I can plot the contract value against the asset name per month. That works fine.

The issue I have is that I want to show if an asset is occupied on another matrix so I created the following measure

Occupied = IF(Contracts[Revenue]=BLANK(),"0","1")

This breaks the relationship's of the matrix. The matrix displays all assets irrespective of what slicer is applied.

 

Screenshot 2020-02-04 at 14.43.26.png

 

pbix file.

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @aTChris ,

 

How about modify the measure as below?

Occupied = IF(Contracts[Revenue]=BLANK(),blank(),"1")

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Thanks @v-jayw-msft 

 

It helps in PBI but what I didnt mention was that I want to use the dataset in excel as well. When using Analyse in Excel I dont have the option of showing zero values. Im trying to insert the 0 into all vacant assetts using the measure to force the pivot to display all assets and not just the contracted ones.

 

The only option I can think of it inserting zero value data into the contracts table for every month and updating the current measures to exclude the zero value data in the measures.

 

Screenshot 2020-02-05 at 09.27.51.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.