Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hello Everyone,
Supposed I have the following data:
Now I want to compute the difference of the module.name and module.version based on a selection of two versions and show it to another table.
For Example
If I have selected version 100 and 102
Then I expect to get a table showing their difference
Now I tried to have a calculate table with the Dax Expression
Solved! Go to Solution.
Hi @mriveraa ,
As far as I know, Power BI doesn't support calculated table/column be dynamic based on slicer or filter. I suggest you to create measures to achieve your goal.
Data model:
SlcierTable1 = VALUES('Module'[Document.version])SlcierTable2 = VALUES('Module'[Document.version])DimModuleName = VALUES(Module[Document.modules.name])
Measure:
Difference =
VAR _SELECT1 =
SELECTEDVALUE ( SlcierTable1[Document.version] )
VAR _SELECT2 =
SELECTEDVALUE ( SlcierTable2[Document.version] )
VAR _VIRTUAL_TABLE =
EXCEPT (
SELECTCOLUMNS (
CALCULATETABLE (
Module,
FILTER ( Module, Module[Document.version] = _SELECT2 )
),
"name", Module[Document.modules.name],
"version", Module[Document.modules.version]
),
SELECTCOLUMNS (
CALCULATETABLE (
Module,
FILTER ( Module, Module[Document.version] = _SELECT1 )
),
"name", Module[Document.modules.name],
"version", Module[Document.modules.version]
)
)
RETURN
MAXX (
FILTER ( _VIRTUAL_TABLE, [name] = MAX ( DimModuleName[Document.modules.name] ) ),
[version]
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mriveraa ,
As far as I know, Power BI doesn't support calculated table/column be dynamic based on slicer or filter. I suggest you to create measures to achieve your goal.
Data model:
SlcierTable1 = VALUES('Module'[Document.version])SlcierTable2 = VALUES('Module'[Document.version])DimModuleName = VALUES(Module[Document.modules.name])
Measure:
Difference =
VAR _SELECT1 =
SELECTEDVALUE ( SlcierTable1[Document.version] )
VAR _SELECT2 =
SELECTEDVALUE ( SlcierTable2[Document.version] )
VAR _VIRTUAL_TABLE =
EXCEPT (
SELECTCOLUMNS (
CALCULATETABLE (
Module,
FILTER ( Module, Module[Document.version] = _SELECT2 )
),
"name", Module[Document.modules.name],
"version", Module[Document.modules.version]
),
SELECTCOLUMNS (
CALCULATETABLE (
Module,
FILTER ( Module, Module[Document.version] = _SELECT1 )
),
"name", Module[Document.modules.name],
"version", Module[Document.modules.version]
)
)
RETURN
MAXX (
FILTER ( _VIRTUAL_TABLE, [name] = MAX ( DimModuleName[Document.modules.name] ) ),
[version]
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!