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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,216,459
Messages
6,130,758
Members
449,588
Latest member
accountant606

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