Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
Hi All,
I have one matrix visual.
That matrix row have : Table 1 [Details]
That matrix column have : Calender[Month_Year_Format]
That matrix value have : one measure[Overall_Measure] it returns values of the details by Month_Year_Format
Then, I create one measure that is :
Solved! Go to Solution.
Hi @Prakash1050 ,
If you want to automatically determine if a month is legal, you can create two columns on the table
IsNotBlank =
IF(
'Table 2'[Value] <> BLANK(),
1,
0
)
IsTrue =
CALCULATE(
SUM('Table 2'[IsNotBlank]),
ALLEXCEPT(
'Table 2',
'Table 2'[Month_Year]
)
)
Create a column on the calendar table
IsExist =
VAR CurrentMonthYear = 'Calendar'[Calendar]
VAR _isTrue =
IF (
ISBLANK (
LOOKUPVALUE (
'Table 2'[IsTrue],
'Table 2'[Month_Year], CurrentMonthYear
)
),
0,
LOOKUPVALUE (
'Table 2'[IsTrue],
'Table 2'[Month_Year], CurrentMonthYear
)
)
RETURN
IF(
_isTrue > 0,
1,
0
)
Putting isExist into the visualization filter
Set is 1 and final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Prakash1050 ,
Thanks for 123abc and Kedar_Pande reply.
Here is what I need to add, according to my tests, custom formatting is not applied to null values when the data in the measure is null. If you want to standardize the format for data that belongs to a class, you can assign 0 to the null value and that will satisfy your requirement. Here is one way to assign 0
Overall_Measure = SELECTEDVALUE('Table'[Value])+0
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply.
This measure is fine.
But i have one measure :
Hi @Prakash1050 ,
If you only want to display values within a particular interval, you can specify the months to display by controlling the filters on the visualization.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Yes correct @v-heq-msft ,
But, the data will be added regularly. So, i need check each time when the data will be added or not and I change the filter selection on each time.
Is any other way to achieve this logic?
Sorry for adding my doubts again and again.
Hi @Prakash1050 ,
If you want to automatically determine if a month is legal, you can create two columns on the table
IsNotBlank =
IF(
'Table 2'[Value] <> BLANK(),
1,
0
)
IsTrue =
CALCULATE(
SUM('Table 2'[IsNotBlank]),
ALLEXCEPT(
'Table 2',
'Table 2'[Month_Year]
)
)
Create a column on the calendar table
IsExist =
VAR CurrentMonthYear = 'Calendar'[Calendar]
VAR _isTrue =
IF (
ISBLANK (
LOOKUPVALUE (
'Table 2'[IsTrue],
'Table 2'[Month_Year], CurrentMonthYear
)
),
0,
LOOKUPVALUE (
'Table 2'[IsTrue],
'Table 2'[Month_Year], CurrentMonthYear
)
)
RETURN
IF(
_isTrue > 0,
1,
0
)
Putting isExist into the visualization filter
Set is 1 and final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @v-heq-msft ,
Thank you for this much effort.
It fullfil my requirement.
Sorry, for this much days delayed.
This is I need. Thank you once again.
Here, the snip of the matrix
Here, Jun 2024 has no values so the background color is not appear.
But i need to show the background color in blank cell also.
It is possible?
How to do?
Please help me
Adjust the Highlight Measure: Update the measure to ensure it applies formatting even when there’s no value in Overall_Measure.
Here’s how you can modify your Highlight measure:
Create a Formatting Measure for the Background: Create a new measure to apply the conditional formatting based on the Highlight measure.
DAX
Apply Conditional Formatting in the Matrix Visual:
This setup will apply the background color #F0AF87 to the entire row where Details is "XXX" or "YYY," regardless of whether Overall_Measure has values.
No, this measure also don't change the background color. The blank values background still in white color.
Update the Highlight Measure
Highlight =
VAR details = SELECTEDVALUE('Table 1'[Details])
VAR hasValue = NOT(ISBLANK([Overall_Measure]))
RETURN
IF(details = "XXX" || details = "YYY" || (details = "XXX" || details = "YYY" && NOT HASONEVALUE('Table 1'[Details]) && NOT hasValue), 1, 0)
In the conditional formatting dialog, set the rules:
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
No, this measure also don't change the background color of the blank values.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |