Disconnected Slicers With DAX Variables And SELECTEDVALUES
Ғылым және технология
Video by Reid Havens - Founder of Havens Consulting and contributing author at P3
www.havensconsulting.net
Today’s topic covers how to create a Disconnected Slicer using DAX Variables and SELECTEDVALUES. We’ve easily written a few dozen articles over the years on ways to use disconnected slicers, and here’s another one! The great thing about DAX is that as it EVOLVES, writing measures and utilizing certain features becomes easier. That’s the goal of this video, it’s not re-inventing the wheel, just refining it. I’ve included below the original DAX Formula I used in the walkthrough. Otherwise, enjoy the video!
Value Selection =
VAR Selection =
SELECTEDVALUE ( 'Value Selection'[Value Selection], "All" )
RETURN
SWITCH (
TRUE (),
Selection = "Actuals", [Sales Amount],
Selection = "Budget", [Budget Amount],
Selection = "Forecast", [Forecast Amount],
[Sales Amount]
)
Пікірлер: 27
Love your work. easy to understand, concise without the waffle of a lot of videos I see. Thanks for sharing
We use disconnected tables all the time, they are so useful for extending the power of data models by making certain analysis possible or by allowing the more efficient use of space like you have demonstrated here. Always great to see they are continuing to grow and evolve. I guess the only issue I have that I haven't sorted out in my own head is how to highlight them. I'm revisiting out standards documentation and I don't have anything satisfactory.
Reid: Great and clever example specially using the variables function
That's awesome... Greaatt video.. Very good explanation.. Looking forward for more intresting videos
Excellent content. Thank you
Great stuff guy. awesome!
Thank you so much!!!
Thank you!! 👍👍
nice intro, and brief clear explanation
Muito bem explicado, meu parabéns!
Excellent and easy to follow breakdown, thanks. Could you run the same example for PowerPivot?
Very helpful ...
Thank you very much!! Just wondering in your video it’s showing the measure of figures. What if my measures are text? Still use selectedvalue? Really appreciate your reply!
Can we add one more variable in switch for example Selection2 having $ and %. When I select ‘Actuals’ and ‘$’ it gives me values in $ and percentage values when I select ‘%’. I am having two Kip’s one for $ and other for %.. same for budget & forecast.
Thank you, Is there a way, I create a card visual which is not related to my Slicer Filter?
Love to hear more best practices. Recommend slowing down a bit and giving more explanation i.e. what is RETURN and why does SWITCH go after that. Why create the formula in the report view and not the table view? Is there a symbol associated with the measure you created (wish you zoomed in)? Also, show what the inefficient method looks like.
@p3adaptive
6 жыл бұрын
Hi Sal, great points. One of the great things about our content is that with over 900 articles now, we've covered a lot of this stuff over the years so we don't necessarily ned to repeat those topics in the videos. However I'll update the description to mention a few good follow up articles to read. I'll post those in the post now
@Sal_A
6 жыл бұрын
PowerPivotPro Will check the linked articles - thanks. I mean I do know the answer to most of my questions, I merely requested it hoping to have you reconfirm my own understanding and for hopefully others out there like me or even for tyros :)
@p3adaptive
6 жыл бұрын
It's great feedback regardless. We're always looking for ways to improve our content. :)
Can we calculate difference between two tasks "task text" column. One tasktext will referred as released date and other will be considered as Closed date. Need to calculate difference between release date and close date based on selection of two tasks in the same slicer.
hi this is great, but switch statement not working for me. when you say return sales amount, budgeted amount. my statement is not linking to those. i cannot get them.. please help.
powerpivotpro.com/2015/07/excel-2016-heartwarming-improvements/ Post of ours which covers variables in more detail
How can do the same for multiple selection in a slicer?
powerpivotpro.com/2015/03/the-diabolical-genius-of-switch-true/ Another post of ours that covers switch
powerpivotpro.com/2012/06/dax-making-the-case-for-switch/ Post of ours which discusses SWITCH
Bruh, excellent vid but, that mouse tho
The mouse click is louder than your voice, and is really annoying/distracting.