March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi @Anonymous
It's not possible to use a measure in a slicer.
I understand you're not able to add calculated columns but are you able to add a calculated table?
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Hi @Anonymous
Go the Modeling tab, then click 'New table'. You'll then need to enter a DAX expression for new table.
Your expression could be something like this:
NewTable =
FILTER(
ALL( Table1[ColumnA] ),
Table1[ColumnA] IN VALUES( Table2[ColumnB] )
)
This new table would contain a single column containing the values from ColumnA in Table1 that also exisit in ColumnB in Table2.
You can then use the new column as a slicer in your report.
Note: since there are no relationships to the new table, your measures will need to reference the new column (probably using TREATAS, VALUES or SELECTEDVALUE) so the slicer selction can be taken into account.
There are plenty of resources available about how to use disconnected slicers. Here are a few:
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Hi @Anonymous
I wanted to stress that, if you added a disconnected slicer, you would probably have to update your measures to take its current value into account. Since you can't use a disconnected slicer, you don't need to worry about it.
Just thought of a solution which may work without you having to edit the model...
Create a measure to identify if a given value in Table1[ColumnA] is also in Table2[ColumnB]:
FilterColumnA =
VAR SelColA = SELECTEDVALUE( Table1[ColumnA] )
VAR Result =
IF (
SelColA IN VALUES ( Table2[ColumnB] ),
"Y",
"N"
)
RETURN Result
Add Table1[ColumnA] as a slicer on your report.
Then add the new measure as a visual level filter set and set it to "Y".
Your slicer will then only show values in ColumnA which also appear in ColumnB.
Best regards,
Martyn
If I answered your question, please help others by accepting it as a solution.
Thank you I will try that.
you want to use column B values only in slicer right?
Go to your model Click on new column
New column=lookupvalue(ColumnA,ColumnA,ColumnB)
or
new column=
VAR SelColA = MAX( Table1[ColumnA] )
VAR Result =
IF (
SelColA IN VALUES ( Table2[ColumnB] ),
Table1[ColumnA],
Blank()
)
RETURN Result
use this column in slicer and filter out blank values from slicer.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
check my blog here
https://community.powerbi.com/t5/Community-Blog/Connecting-to-a-Tabular-Model-Using-Power-BI/ba-p/91...
try this,
New column=calculate(max(table1[col A]),contains(table1,table1[col A],table2[col B]))
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
check my blog here
https://community.powerbi.com/t5/Community-Blog/Connecting-to-a-Tabular-Model-Using-Power-BI/ba-p/91...
Anyone..?
By the way, here's a basic overview:
So, when I use 'Slicer 1' - the fact table and 'Slicer 2' change their values, accordingly.
The thing is I want 'Slicer 3', that has the same values like 'Slicer 2', to display only the current values of 'Slicer 2', and it doesn't.
Hope this makes sense.
Column = CONTAINS(Table2, Table2[Value], Table1[Value])
create this column and check is it working or not and then create measure on this.
Thanks,
Pravin
Thank you @Anonymous I will try that tomorrow since I'm not at work right now.
I added a picture to demonstrate my situation, I'd love you to check.
Hi @Anonymous
create one measure to check if value is there in another table or not.
if you want to create column at cube then use this dax
Hi @Anonymous
use The first solution which i have shared using measure and Some screenshots.
You don't need to do anything at cube. you can create that measure at power Bi side only.
and follow those steps.
You are getting error may be because of your SSAS version as Selectvalue() is not supported for versions less than 2016.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
19 | |
17 | |
9 | |
5 |
User | Count |
---|---|
36 | |
29 | |
16 | |
15 | |
12 |