cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
fbostan1
Frequent Visitor

Help with Matrix Chart

I have this Matrix chart with many measures to get this these numbers, but I only want to show the any data above the red line and hide the ones below the red line., is this possible in PowerBI?

Can someone please help out, Thank you!

fbostan1_0-1655491741494.png

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @fbostan1

 

Do you have date column or date table in the model? If so, we can consider using date related functions to move back to a previous month end date and compare it with the month value on the column. If you only have YearMonth values in the source table, we need to use other methods. 

 

For example

New Month+1 = 
var lastMonth = VALUE(FORMAT(EOMONTH(TODAY(),-1),"yyyymm"))
return
IF(MAX('Table'[YearMonth])<=lastMonth,[Month+1],BLANK())

vjingzhang_1-1655802169394.png

 

You need to modify the code for variable lastMonth in above measure according to your tables. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @fbostan1

 

Do you have date column or date table in the model? If so, we can consider using date related functions to move back to a previous month end date and compare it with the month value on the column. If you only have YearMonth values in the source table, we need to use other methods. 

 

For example

New Month+1 = 
var lastMonth = VALUE(FORMAT(EOMONTH(TODAY(),-1),"yyyymm"))
return
IF(MAX('Table'[YearMonth])<=lastMonth,[Month+1],BLANK())

vjingzhang_1-1655802169394.png

 

You need to modify the code for variable lastMonth in above measure according to your tables. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

speedramps
Community Champion
Community Champion

You haven't given enough info for a full answer

 

I would try get the max possible date for the row and column.

If they are valid then dispaly you old measure, otherwise display blanks.

 

newmeasure =

//get max date for each column
VAR xdate= MAX(yourtable[xdate])
// get max date for each rown
VAR ydate= MAX(yourtable[ydate])
RETURN
IF(ydate <= xdate, [oldmeasure], BLANK())

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors