This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
Hi All,
I need a help to create Virtual Table -
I have a dropdown slicer. Based on the Dropdown slicer selection i need to caluculate the distance from the selected location to existing table locations. I am using measure for caluculation part. I am able to get all the location distance from the selected location.
It is working fine for single selection as Expected (Example below)
| Single Selection | |||
| Selected Value in the Slicer Dropdown | ABC | ||
| Table | |||
| Name | Location | Amount | Distance(Using Measure) |
| ABC | Location1 | 1000 | 123 |
| BCD | Location2 | 1001 | 234 |
| CDF | Location3 | 1002 | 345 |
| DEF | Location4 | 1003 | 567 |
| EFG | Location5 | 1004 | 123 |
| FGH | Location6 | 1005 | 278 |
If i select multiple locations in the dropdown, Power BI is confused to caluculate the distance. I need a way to caluculate multiple selections. (i think it can be possible using Virtual table as below.)
| Multiple Selection | ||
| Selected Value in the Slicer Dropdown | ABC, BDC |
| Table | |||||
| Name | Location | Amount | Distance(Using Measure) | Selected Value | |
| ABC | Location1 | 1000 | 123 | ABC | |
| BCD | Location2 | 1001 | 234 | ABC | |
| CDF | Location3 | 1002 | 345 | ABC | |
| DEF | Location4 | 1003 | 567 | ABC | |
| EFG | Location5 | 1004 | 123 | ABC | |
| FGH | Location6 | 1005 | 278 | ABC | |
| ABC | Location1 | 1000 | 123 | BDC | |
| BCD | Location2 | 1001 | 234 | BDC | |
| CDF | Location3 | 1002 | 345 | BDC | |
| DEF | Location4 | 1003 | 567 | BDC | |
| EFG | Location5 | 1004 | 123 | BDC | |
| FGH | Location6 | 1005 | 278 | BDC |
Can anyone guide me on this approach.?
Solved! Go to Solution.
if you follow my logic calculation I think you will go do it
Hi @Ahmedx ,
Thanks for your Quick help. I can use this. In my case the @slicer value we are getting from other table. As we are having 2.5L records in the Other table. Can we caluculate the Virtual table only the values after slicer select?
if you follow my logic calculation I think you will go do it
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 29 | |
| 23 | |
| 22 | |
| 20 | |
| 20 |