Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I want to use VALUES function and study from https://dax.guide/values/ that input is table/column and output table (one or more columns)
I tried to od it on most simplest case but it failed, can sombebody told me why ? everything seems OK based on DAX guide, what I missed ?
Current Data Model
My DAX formula
Measure = VALUES(Locations[Location])
When I tried to test it on table
Measure = VALUES(Locations)
I got another error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
I am totally confused, because there is only one condition that input parameter must be table or column,
any ideas what I missed ? (Don t think so that DAX.guide is wrong in description)
thanks in advance!
What calculation do you want to do ?
Hi @JamesFR06 ,
my whole scenario is setup 2 slicers which each one will affect second one, so if I select one speicific user in slicer, then second slicer (with location values) will be filtered based on previous option.
So my logic is following
affectedSlicer = Calculatetable (Cal)
It's automatic, you just have to put the column name in 1 slicer and if relationshios are ok it should be ok
unfortunatelly the relation are issue 😞 these are fix , therefore I asked here 😞
and still dont understand what VALUES return if not tabular 😞
Just give me an example of your tables, it would be easier for help
Hi @JamesFR06
Here are pics,
unfortunatelly this forum doesn t support PBIX files 😞 it could be much easier
Data Model is here (unfortunatelly if both direction filter will be allowed it will works, but for this usecase I cannot swith it)
current status when I select random USER I see all location (instead of only them that are related to selected user)
see pict 1
so goal is to avoid these "restricted combinations"
IN your exemple, Alice had 3 Locations, LA, London and Tokyo not NY. It is normal that it gave you blank result.
So if i understood correctly you want the filter of location to be cleaned with only locations available for hte current name ?
yes exactly, when you select user then specific location should be selected for him,
I think that it can be achieved via userelationships but I failed
Pertr_
ok so I made an example :
Go to "Modelisation" (Sorry I ve got pwbi in french 🙂 ) and after on the top left relation
You click on the name slicer
this icone will appear on location slicer. You click on it and it's done
Actually, this is working only when you are filtering from fact table (In my case it is Events) I need it from dimension Users, I am aware of this option that you mentioned 🙂
ok this should work
1 ) Measure
Hi
With a measure you can return only a unique value
Values will not work because it return a list of unique values of the column.
Hello @JamesFR06 ,
thanks for input !
but in documentation is written that it returns table/tabular and not scalar, therefore I am confused
I also tried to use it in CALCULATE(VALUES(Locations)) and also it is not working, so I am confused again 😄
issue is definitively somewhere in my code
@JamesFR06I also tried CALCULATETABLE(VALUES(Locations)) and doesn t any output
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |