Fake vectorization in Dax

martingaleh

Board Regular
Joined
Jul 18, 2011
Messages
83
I can't figure out what the vectorization is in DAX

If I have a calculated column based on a slicer like
=Slicer[field]
Of course that doesnt' work. I don't know why, but you need to wrap it in:
=Values(Slicer[field]), probably because Dax tries to combine its column logic and its aggregation logic into one concept whereas every other BI tool I've seen separates them.

If I want the column to return Slicer[field1]&"_"&Slicer[field2], the following doesn't work
= Slicer[field1]&"_"&Slicer[field2]
=values(Slicer[field1]&"_"&Slicer[field2])
=values(Slicer[field1])&"_"&values(Slicer[field2])

and finally if I want to do an if statement with the slicer data
if(hasonevalue(slicer[field1]),if(values(Slicer[field1])&"_"&values(Slicer[field2])>[field1]&"_"&[field2]

What's the right code for that?

Thanks for reading.

p.s. It's fake vectorization because in numpy or pandas or whatever, the vectorization would be explicit and it would be crystal clear what the transform was.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top