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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Vishruti
Helper I
Helper I

Matrix Visual to Display Columns where Data Does not Exist

I have data (as given below) (also attached in Excel).

The data is about Products, Product Type and Quarter-Year.
For one product, there may be multiple Product Types for the same quarters or multiple quarters. Or for a particular product, there may not be any product type given for a particular quarter.

IMG_6225.jpeg



I want to create a Matrix visual with Product on Rows, Year-Quarter on Columns and Product Type in the Values.
I have a date slicer. Whichever range user selects from the date slicer, I want to show only 8 quarters in matrix visual based on the minimum date selected in the filter. (Min selected included).

The main problem is, if a particular quarter does not have any record for any product then that Quarter column is not displayed. I want this column also to be seen with either a blank space or "-" like below

IMG_6226.jpeg

Dummy data link - https://docs.google.com/spreadsheets/d/14aknAb9mBGgQwMongOs7QBkW45npasmMUYX-1_bhqrw/edit?usp=drivesd...

PS I have tried the "Show Items With No Data" setting but it did not work.

4 REPLIES 4
rohit1991
Super User
Super User

Hi @Vishruti 

1. The sample data that I used to solve this problem is shown below.
image.png

 

 

 

 

 

 

 

 

 

 

 

 

2. Create new Table :

QuarterTable = 
ADDCOLUMNS (
    DISTINCT (
        SELECTCOLUMNS (
            ADDCOLUMNS (
                CALENDAR (DATE(2025,1,1), DATE(2027,12,31)),
                "Quarter_Year", "Q" & FORMAT(ROUNDUP(MONTH([Date])/3,0), "0") & "_" & YEAR([Date])
            ),
            "Quarter_Year", [Quarter_Year],
            "Year", YEAR([Date]),
            "QuarterNum", ROUNDUP(MONTH([Date])/3,0)
        )
    ),
    "SortOrder", [Year]*10 + [QuarterNum]
)

 

3. Go to Data view

   Select Quarter_Year column >> Sort by column >> SortOrder


image.png

 

4. Create Relationship Many to One.

image.png

 

5. Create Measure:

Product Type Display = 
VAR _type =
    SELECTEDVALUE ( 'Sample Data'[Product Type] )
RETURN
    IF ( ISBLANK ( _type ), "-", _type )

 

6. Click on your Matrix visual >> Right-click on QuarterTable[Quarter_Year] field in the “Columns” area  >> click on  "Show items with no data".


image.png

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
nandic
Super User
Super User

Hi @Vishruti ,

In data you need to have all expected values.
Example, in sheet "Data" there is no Quarter_Year "Q3_2025" and "Q3_2026".

As it is completelly missing, it can't be shown.

So there are two options:
1. add these columns in Data sheet
2. make data model a little bit more complicated, where you would have disconnected table with all needed values and then using DAX make it work nicely

But for this stage, i suggest the first option.

Cheers,
Nemanja

ThxAlot
Super User
Super User

There's a built-in optimization technique called "Auto-Exist", which is used by the filtering mechanisms of DAX.

Understanding DAX Auto-Exist - SQLBI



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Rupak_bi
Super User
Super User

Hi @Vishruti ,

You need to make a master quarter table with all quarter names. here is your expected result below. attaching PBIX for referance.

Rupak_bi_0-1761553164436.png



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors