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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ksahil16
Frequent Visitor

Except not working for displaying content

I have written a Measusre which helps me get the values from two tables, where I want to compare the first table to second table using the column Index in both the tables. 

First sep I extract Index column values from both the tables:

CombinedIndexes =

VAR SelectedIndexesList =

SELECTCOLUMNS(
                    VAR StartDate = MIN('Relation_Association'[published_on])
                    VAR EndDate = MAX('Relation_Association'[published_on])
                    RETURN
                                 FILTER( Relation_Association, Relation_Association[published_on] >= StartDate && Relation_Association[published_on] <= EndDate ),
                                 "Index", Relation_Association[Index] )

VAR SelectedIndexesList_2 =

SELECTCOLUMNS(

                             VAR StartDate = MIN('Relation_Association_2'[published_on])
                             VAR EndDate = MAX('Relation_Association_2'[published_on])
                             RETURN FILTER( Relation_Association_2, Relation_Association_2[published_on] >= StartDate && Relation_Association_2[published_on] <= EndDate ),
                              "Index", Relation_Association_2[Index] )

VAR Difference = EXCEPT(SelectedIndexesList_2, SelectedIndexesList)

RETURN Difference

But when I use it in the visual, I expect to have the values that are not present in SelectedIndexesList but present in SelectedIndexesList_2. When I put this in a card visual i get "Cant disply the visual" error. 

Can someone let me know how can I get the logic to work where I would like to have the values on the indexes not present in SelectedIndexesList but present in SelectedIndexesList_2.

1 REPLY 1
amitchandak
Super User
Super User

@ksahil16 , In this case you should both of them with common index and date tables and analyze using common tables as filters and use in visual

 

 

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.