Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
We have the sample data set as shown below.
| Index | Fiscal Quarter | Customer Name | Health | Region |
| 1 | FY Q1 2024 | T Mobile | RED | South |
| 2 | FY Q1 2024 | J&J | GREEN | Central |
| 3 | FY Q2 2024 | Wallmart | GREEN | West |
| 4 | FY Q4 2024 | SAP | YELLOW | East |
| 5 | FY Q1 2023 | APPLE | RED | South |
| 6 | FY Q2 2023 | Amazon | YELLOW | South |
| 7 | FY Q2 2023 | NetFlex | GREEN | West |
| 8 | FY Q2 2023 | Aha | RED | Central |
| 9 | FY Q2 2024 | Samsung | YELLOW | West |
| 10 | FY Q2 2023 | Moto | RED | West |
I have created the Matrix visual as shown below.Conditional formatting is based on Health field.
Customer Name Conditional formatting is based on Health field.
DAX for "Custom Index" column
Issue:
When i select the Slicer Region as "West" report displays the data as shown below.
But our expected results are as below.We do not need the empty cell.
When we uncheck the "West" it should go to the default view.
Could anyone please help me on it.
Thanks,
Suresh.
@danextian @lbendlin @rajendraongole1 @johnt75 @Ritaf1983 @Bibiano_Geraldo @DataNinja777
Solved! Go to Solution.
HI @sureshg2498 ,
Since the custom index is a calculated column, it is not possible to recalculate its order when filtering by region or using any slicer in your report. This happens because calculated columns do not update dynamically based on applied filters.
If the index were a measure, it could be recalculated dynamically, but the issue is that measures cannot be placed in the row fields of a matrix.
One way to work around this limitation is by creating a rank for each region. However, this approach increases the size of the data model, so it is not recommended.
Here’s the process:
This will allow the filters to be applied correctly and display the expected results.
The following DAX code creates a ranking for the East region, filtering only the data for that region when calculating the rank, repeat this for others:
East =
VAR CurrentQuarter =Sheet1[Fiscal Quarter]
VAR SortedTable =
FILTER (
Sheet1,
Sheet1[Fiscal Quarter] = CurrentQuarter && Sheet1[Region] = "East"
)
RETURN
RANKX((SortedTable),Sheet1[Index], , ASC,Dense)
The output expected:
This is not best practice because the ranking columns are not created dynamically. This means that if new regions are added in the future, you will need to manually update the parameter table and create new columns for the additional regions.
Additionally, if you are working with large datasets, this approach can significantly increase the size of your model.
Thank you so much Bibiano.Your insights were incredibly helpful. I really appreciate the time you took to guide me.
Thank you so much IbendIin. Your assistance was incredibly helpful.Thank you for taking the time to help me solve that problem. Your expertise was invaluable. I wanted to take a moment to express my gratitude for your assistance with my issue. I really appreciate it. Thank you once again!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |