DAX Fridays! #184: Show last label only on a line chart in Power BI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so hello everybody it is friday so it's time for another tax writers on your dax function every friday in today's live fridays i am going to show you a tax measure that will allow you to display only the late the last label on a line chart ish i'll show you i'll show you let's get started okay guys here's the thing i have here my line chart you'll see in a second why is my line chart and i am filtering my stuff and is only telling us the last level of the chart the reason why this is useful is in case you want to know just the real number of how things are going today or in a specific time period and then you want to know more or less like up and down right so this is not an accounting trick but it will work for a business user very very useful now let me show you what i got the idea this is from barrett and i'm going to link to his blog post down below and he has a very cool way to do it very clever actually so what i'm going to do is not exactly what he did because in my example i have time in the x-axis and i want to be able to you know filter or slice and dice by the axis and still keep the min and max value so he as he says on his blog post the dax will change depending on what you're trying to do so i'm going to show you a different version then you can go and check his version out but the concept is the same this is what we're going to do i am going to put date column this is another one data set right so nothing we are there sales and what we need to do in order to do that trick is we need to have a column that plots only the last value the max value so how do we do that how about we start creating that so we're going to do max value so we're going to do calculate the max and because we have time we're going to do we have like months down there we want to do it on the date calendar and then i want this to be dynamically so i want you when you decrease or increase the dates in your calendar on the slicer to to be able to adjust for that so i barrett uses all i need to use all select in here for it to work so calendar date i'm going to show you what it does so this will go and pick the mass max value you see her here is 1998 6th of may and if i go in there and i change this you see that it goes and changes accordingly so that's why we're using all selected so whatever interval that you have whatever the dates you selected pick the max and this is what this thing is actually doing easy right so max value and now what we want to do is like this we're going to put this into a variable max paid i don't know if max date is bc probably not return i always spell that wrong return if the max of the calendar so if the calendar date the max date is the same as the max date that we have up there so that means if we are in the date that is the max of the period selected then sorry then give me the sales nothing more and what this is going to do is for the max value is going to sell to return the actual sales value and the rest is going to leave it blank good right okay so what do we do with that and this is super clever let me show you what he did is he used a clustered column chart and then he put this i'm going to leave so you can see what's going on you can put the date and then you put the sales on the values so the line values right come on go there sales okay so now we have our sales thing something like that this is by date now and we're going to do now on the column values we're going to put our max value put it there and do you see there the blue thing well we don't want the bar to be seen so we're going to go to data colors and paint it it would be great it would be transparent but there's no such thing so it will be white and we're going to turn the data levels on but we're going here to customize series and we're going to turn on max value but we're going to turn off sales so only max value is going to be seen do you see it down there ah there you go you see and now you can also go the other direction and pick the mean value now be mindful that if the data you pick there's no value it won't show anything so okay you see that is adjusting accordingly so if you want to know more about all select i have a video there go and check it out otherwise i will see you on monday have a great weekend and
Info
Channel: Curbal
Views: 5,367
Rating: 4.9622641 out of 5
Keywords: Power bi, powerbi, Curbal, power bi desktop, power bi tutorial, power bi training, power bi for beginners, ruth pozuelo, Show last label only on a line chart in Power BI, show end label only power bi, display end label power bi
Id: tGL7C2gLOsE
Channel Id: undefined
Length: 6min 25sec (385 seconds)
Published: Fri Sep 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.