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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
naoyixue1
Post Patron
Post Patron

How to create a virtual table based on one column value I selected

Hey all,

 

I try to create a table based on the version I selected (see below example). I also created a reference table for version in below in blue. 

If I select version 2 in sales table, I will only see SKU A and B with value 17 and 10 separately. 

naoyixue1_1-1715635273102.png

 

GIven that, I created a virtual table , but it doesn't work. Would you take a look and let me know if any other thoughts

CALCULATETABLE(SUMMARIZE('Sales Table','Sales Table'[SKU],'Sales Table'[Value]),'Sales Table'[Version]=SELECTEDVALUE(Version[Version]))
1 ACCEPTED SOLUTION

@naoyixue1 ,
Absolutely ! 🙂
Attached is a pbix with your screenshot's dummy data.

View solution in original post

6 REPLIES 6
Anand24
Super User
Super User

Hi @naoyixue1 ,
When selecting version 2, should it show just A, B or should it show A, B, C with 17, 10, 10 respectively? 

Also, if you have a single table, your table/matrix visual will automatically show only those relevant values when using version slicer. You actually don't need to create a separate table for it.

 

Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

 

 

Sorry, yes, if selecting version 2, we should see A, B and C with 17,10 and 10 separately. I actually try to calculate the sku level fair share based on the selection. That's why I'm thinking I might create a virtual table to only highlight the version of data as I selected. In the real data, there are also columns of month and customers. But just curious whether there is some way for me to do so using calculateable summarize with selectedvalue dax...

naoyixue1
Post Patron
Post Patron

Sorry, I just corrected my dax to create a virutal table as below. But still doesn't work. 

 

CALCULATETABLE(SUMMARIZE('Sales Table','Sales Table'[SKU],'Sales Table'[Value]),filter('Sales Table','Sales Table'[Version]=SELECTEDVALUE(Version[Version])))

@naoyixue1 ,
You don't need a separate table at all in your case. If you are using a table/matrix and pulling fields from related tables, it will simply show the values based on slicer selection.

Even if you create a calculated table (which AFAIK can't be created on slicer selection), you will have to create a relationship with the original table from where you are pulling the field in slicer. 

So what's your saying is I can create the fair share at SKU level at the original table, which will change based on the version I selected? Let me try that. Thanks!

@naoyixue1 ,
Absolutely ! 🙂
Attached is a pbix with your screenshot's dummy data.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.