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
AmiraBedh
Super User
Super User

Show items with no data is not giving expected result

  • I am using a Live connection to an SSAS tabular model having the following tables :

 

Employees : all Employees in the company

Employees VIP : Employees having the status of VIP in the company

Employees TIC : Employees having the status of TIC in the company

 

The relationships between the tables :

Employees - Employees VIP : 1 to many , filter in both directions based on EmpID

Employees - Employees TIC : 1 to 1 , filter in both directions based on EmpID

AmiraBedh_0-1716491027840.png

 

I am using in a visual columns from the 3 tables :

Employees : EmpID, EmpName, EmpLastName

Employees VIP : Status VIP

Employees TIC : Status TIC

 

I have this visual where I use data from Employees and Employees TIC :

 

AmiraBedh_1-1716491134489.png

 

When I try to add for the previous visual, columns from Employees VIP :

 

AmiraBedh_2-1716491338534.png

 

Now I want to show all the Employees, either they belong or not to any VIP or TIC so I selected Show items with no data :

AmiraBedh_3-1716491453732.png

When I try to change the order of the Staus VIP to be before Status TIC :

The display of data changes for the Employees E,F, G and H, I can"t understand this behaviour :

 

AmiraBedh_4-1716491715298.png

 

 

 

 

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
1 ACCEPTED SOLUTION
AmiraBedh
Super User
Super User

I ended up finding the answer to this behavior :

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-show-items-no-data

 

It's important to note that the mechanism of selecting values for the columns is order-dependent, and can be thought of as a Left outer join operation between tables. If the order of the columns is changed, the results change as well.

 

powerbi - Show items with no data is not giving expected result - Stack Overflow


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

9 REPLIES 9
AmiraBedh
Super User
Super User

I ended up finding the answer to this behavior :

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-show-items-no-data

 

It's important to note that the mechanism of selecting values for the columns is order-dependent, and can be thought of as a Left outer join operation between tables. If the order of the columns is changed, the results change as well.

 

powerbi - Show items with no data is not giving expected result - Stack Overflow


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
parry2k
Super User
Super User

@AmiraBedh regarding VIP table, I see it has one to many relationship, do you expect more than one record for employees, although TIC is 1 to 1



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

If I change the relationship to 1 to 1 it gives the expected result, but I cannot change it in the real model as it is 1 to many. Any workaround ?

 

AmiraBedh_0-1716535257520.png

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
parry2k
Super User
Super User

@AmiraBedh so I reviewed the queries and the engine is doing different queries when you move the column positions in the visual:

 

Basically this part of the query is different in both the case and causing the result:

 

//showing tic then vip
// DAX Query
DEFINE
    VAR __DS0PrimaryShowAllCompat =
        //
        //					CALCULATETABLE(
        //						GENERATEALL(
        //							KEEPFILTERS(VALUES('Employees'[EmpName])),
        //							CALCULATETABLE(
        //								GENERATEALL(
        //									KEEPFILTERS(VALUES('Employees'[EmpLastName])),
        CALCULATETABLE (
            GENERATEALL (
                KEEPFILTERS (
                    FILTER (
                        KEEPFILTERS ( VALUES ( 'Employees TIC'[Status TIC] ) ),
                        OR (
                            CALCULATE ( NOT ( ISEMPTY ( 'Employees TIC' ) ) ),
                            CALCULATE ( NOT ( ISEMPTY ( 'Employees VIP' ) ) )
                        )
                    )
                ),
                CALCULATETABLE (
                    FILTER (
                        KEEPFILTERS ( VALUES ( 'Employees VIP'[Status VIP] ) ),
                        CALCULATE ( NOT ( ISEMPTY ( 'Employees VIP' ) ) )
                    )
                )
            )
        ) //								)
//							)

EVALUATE
__DS0PrimaryShowAllCompat

 

//vip first then tic

// DAX Query
DEFINE
    VAR __DS0PrimaryShowAllCompat =
        //        CALCULATETABLE (
        //            GENERATEALL (
        //                KEEPFILTERS ( VALUES ( 'Employees'[EmpLastName] ) ),
        CALCULATETABLE (
            GENERATEALL (
                KEEPFILTERS (
                    FILTER (
                        KEEPFILTERS ( VALUES ( 'Employees VIP'[Status VIP] ) ),
                        CALCULATE ( NOT ( ISEMPTY ( 'Employees VIP' ) ) )
                    )
                ),
                CALCULATETABLE (
                    FILTER (
                        KEEPFILTERS ( VALUES ( 'Employees TIC'[Status TIC] ) ),
                        CALCULATE ( NOT ( ISEMPTY ( 'Employees VIP' ) ) )
                    )
                )
            )
        ) //            )
//        )

EVALUATE
__DS0PrimaryShowAllCompat


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

So it is a normal behavior?

How to achieve what I want in this case ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
parry2k
Super User
Super User

@AmiraBedh Very hard to reach, I wish you had put that as the code. Can you share the sample pbix file to look into it?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

You can find the link to Google Drive : https://drive.google.com/drive/folders/1-rk-VKwYrGdbY7q_cjk_3TlBbAtH3U-H?usp=sharing


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
parry2k
Super User
Super User

@AmiraBedh that's interesting. Can you get the DAX query for both cases using a performance analyzer to see what is happening behind the scenes.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

The query for the 1st visual :
 
DEFINE
VAR __DS0Core = 
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'Employees'[EmpName],
'Employees'[EmpLastName],
'Employees TIC'[Status TIC],
'Employees VIP'[Status VIP],
"CountRowsEmployees_VIP", COUNTROWS('Employees VIP')
)
),
OR(
OR(
OR(
NOT(ISBLANK('Employees'[EmpName])),
NOT(ISBLANK('Employees'[EmpLastName]))
),
NOT(ISBLANK('Employees TIC'[Status TIC]))
),
NOT(ISBLANK('Employees VIP'[Status VIP]))
)
)
),
"'Employees'[EmpName]", 'Employees'[EmpName],
"'Employees'[EmpLastName]", 'Employees'[EmpLastName],
"'Employees TIC'[Status TIC]", 'Employees TIC'[Status TIC],
"'Employees VIP'[Status VIP]", 'Employees VIP'[Status VIP]
)
 
VAR __DS0PrimaryWindowed = 
TOPN(
501,
__DS0Core,
'Employees'[EmpName],
1,
'Employees'[EmpLastName],
1,
'Employees TIC'[Status TIC],
1,
'Employees VIP'[Status VIP],
1
)
 
EVALUATE
__DS0PrimaryWindowed
 
ORDER BY
'Employees'[EmpName],
'Employees'[EmpLastName],
'Employees TIC'[Status TIC],
 
'Employees VIP'[Status VIP] 
 
Then selecting the option Show items with no data :
 
// DAX Query DEFINE VAR __DS0Core = SELECTCOLUMNS( KEEPFILTERS( FILTER( KEEPFILTERS( SUMMARIZECOLUMNS( 'Employees'[EmpName], 'Employees'[EmpLastName], 'Employees TIC'[Status TIC], 'Employees VIP'[Status VIP], "CountRowsEmployees_VIP", COUNTROWS('Employees VIP') ) ), 
OR( OR( OR( NOT(ISBLANK('Employees'[EmpName])), NOT(ISBLANK('Employees'[EmpLastName])) ), 
NOT(ISBLANK('Employees TIC'[Status TIC])) ), NOT(ISBLANK('Employees VIP'[Status VIP])) ) ) ), "'Employees'[EmpName]", 'Employees'[EmpName], "'Employees'[EmpLastName]", 'Employees'[EmpLastName], "'Employees TIC'[Status TIC]", 'Employees TIC'[Status TIC], "'Employees VIP'[Status VIP]", 'Employees VIP'[Status VIP] ) VAR __DS0PrimaryShowAllCompat = FILTER( KEEPFILTERS( GENERATEALL( KEEPFILTERS( FILTER( KEEPFILTERS(VALUES('Employees'[EmpName])), OR( CALCULATE(NOT(ISEMPTY('Employees'))), CALCULATE(NOT(ISEMPTY('Employees VIP'))) ) ) ), CALCULATETABLE( GENERATEALL( KEEPFILTERS(VALUES('Employees'[EmpLastName])), CALCULATETABLE( GENERATEALL( KEEPFILTERS( FILTER( KEEPFILTERS(VALUES('Employees TIC'[Status TIC])), OR( CALCULATE(NOT(ISEMPTY('Employees TIC'))), CALCULATE(NOT(ISEMPTY('Employees VIP'))) ) ) ), CALCULATETABLE( FILTER( KEEPFILTERS(VALUES('Employees VIP'[Status VIP])), CALCULATE(NOT(ISEMPTY('Employees VIP'))) ) ) ) ) ) ) ) ), OR( OR( OR( NOT(ISBLANK('Employees'[EmpName])), NOT(ISBLANK('Employees'[EmpLastName])) ), NOT(ISBLANK('Employees TIC'[Status TIC])) ), NOT(ISBLANK('Employees VIP'[Status VIP])) ) ) VAR __DS0PrimaryShowAll = SUMMARIZE( UNION(__DS0Core, __DS0PrimaryShowAllCompat), 'Employees'[EmpName], 'Employees'[EmpLastName], 'Employees TIC'[Status TIC], 'Employees VIP'[Status VIP] ) VAR __DS0PrimaryWindowed = TOPN( 501, __DS0PrimaryShowAll, 'Employees'[EmpName], 1, 'Employees'[EmpLastName], 1, 'Employees TIC'[Status TIC], 1, 'Employees VIP'[Status VIP], 1 ) EVALUATE __DS0PrimaryWindowed ORDER BY 'Employees'[EmpName], 'Employees'[EmpLastName], 'Employees TIC'[Status TIC], 'Employees VIP'[Status VIP] 
 
Then changing the order :
 
// DAX Query
DEFINE
VAR __DS0Core = 
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'Employees'[EmpName],
'Employees'[EmpLastName],
'Employees VIP'[Status VIP],
'Employees TIC'[Status TIC],
"CountRowsEmployees_VIP", COUNTROWS('Employees VIP')
)
),
OR(
OR(
OR(
NOT(ISBLANK('Employees'[EmpName])),
NOT(ISBLANK('Employees'[EmpLastName]))
),
NOT(ISBLANK('Employees VIP'[Status VIP]))
),
NOT(ISBLANK('Employees TIC'[Status TIC]))
)
)
),
"'Employees'[EmpName]", 'Employees'[EmpName],
"'Employees'[EmpLastName]", 'Employees'[EmpLastName],
"'Employees VIP'[Status VIP]", 'Employees VIP'[Status VIP],
"'Employees TIC'[Status TIC]", 'Employees TIC'[Status TIC]
)
 
VAR __DS0PrimaryShowAllCompat = 
FILTER(
KEEPFILTERS(
GENERATEALL(
KEEPFILTERS(
FILTER(
KEEPFILTERS(VALUES('Employees'[EmpName])),
OR(
CALCULATE(NOT(ISEMPTY('Employees'))),
CALCULATE(NOT(ISEMPTY('Employees VIP')))
)
)
),
CALCULATETABLE(
GENERATEALL(
KEEPFILTERS(VALUES('Employees'[EmpLastName])),
CALCULATETABLE(
GENERATEALL(
KEEPFILTERS(
FILTER(
KEEPFILTERS(VALUES('Employees VIP'[Status VIP])),
CALCULATE(NOT(ISEMPTY('Employees VIP')))
)
),
CALCULATETABLE(
FILTER(
KEEPFILTERS(VALUES('Employees TIC'[Status TIC])),
CALCULATE(NOT(ISEMPTY('Employees VIP')))
)
)
)
)
)
)
)
),
OR(
OR(
OR(
NOT(ISBLANK('Employees'[EmpName])),
NOT(ISBLANK('Employees'[EmpLastName]))
),
NOT(ISBLANK('Employees VIP'[Status VIP]))
),
NOT(ISBLANK('Employees TIC'[Status TIC]))
)
)
 
VAR __DS0PrimaryShowAll = 
SUMMARIZE(
UNION(__DS0Core, __DS0PrimaryShowAllCompat),
'Employees'[EmpName],
'Employees'[EmpLastName],
'Employees VIP'[Status VIP],
'Employees TIC'[Status TIC]
)
 
VAR __DS0PrimaryWindowed = 
TOPN(
501,
__DS0PrimaryShowAll,
'Employees'[EmpName],
1,
'Employees'[EmpLastName],
1,
'Employees VIP'[Status VIP],
1,
'Employees TIC'[Status TIC],
1
)
 
EVALUATE
__DS0PrimaryWindowed
 
ORDER BY
'Employees'[EmpName],
'Employees'[EmpLastName],
'Employees VIP'[Status VIP],
'Employees TIC'[Status TIC]
 
 
 
 
 
 

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

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