This post is also available in: DeutschDeutsch

New notation for Date or DateTime format in Power BI

This post is also available in: Deutsch Quick update on the Power BI August 2021 release and this more, in case you encounter this new spelling and wonder what it is.As the title suggests, there is a new way to create a Date or DateTime value. If we consider the CALENDAR function as an example, then two values in the format Date must be specified as parameters. Up to now this was possible with the DATE function. For example, a calendar for the year 2021 would be created in DAX like this: If you want to have a calculation with date and time, then you have to add the TIME function: And here the notation with DATE and TIME actually becomes a bit tiresome. Notation as text A new option is to write a date or date and time as a simple string in the following format: Or time included: Thus, it is possible to describe the above two examples in the following way: Or time included: From my point of view a very useful feature, because it saves a little bit of typing. However, I would be even happier to have an improved handling of the time calculations. […]
This post is also available in: Deutsch In September last year I had already written an article on how to dynamically adjust the values of a measure, for example in millions, thousands or without scaling: Dynamic scaling of a measure in Power BI with DAX The approach at that time with the FORMAT function had a big disadvantage, the value is always converted to a text with FORMAT. This means that the measure can only be used in tables, because bar and line graphics cannot display texts. With old approach representation only possible in tables In the meantime, however, there is a much better way to display a measure with dynamic formatting using Calculation Groups. With Calculation Groups I can also create the formatting dynamically via DAX and this is – like every DAX function – calculated individually for each row. I use the same scenario as in the original article. If I have not selected any customers, I get high numbers and therefore I want to get scaling: However, if I filter on a specific customer, then the values should be displayed without scaling, because the scaling is too high in the normal case: Implement formatting via Calculation […]
This post is also available in: Deutsch Pretty much since I started the blog, I’ve been gradually sharing my code snippets for DAX and M here on the website. As the list got longer and longer and more and more confusing with all the examples, I decided to maintain and publish the code snippets on GitHub from now on. There I can provide and maintain them much more organized. As usual, I’ll add new examples to the list as I come across something that might be useful for you. The snippets are available on:: https://github.com/selimovd/PowerBISnippets/ […]
This post is also available in: Deutsch Last week I had investigated why a what-if parameter sometimes skips values and how to bypass this. In a discussion with my valued friend Bernat Agulló, we came across the topic of single values in slicers and he directed me to a tweet on how to do this with Tabular Editor. Single values as slicer with tabular editor In order to do this, the experimental features must first be activated in Tabular Editor. This can be done under File > Preferences: After that, the desired column must be selected. In the Metadata settings under “Extended Properties” a new “JsonExtendedProperty” has to be created: We specify ParameterMetadata as the name of the property and {“version”:0} as the value: Afterwards, the data model needs to be saved in the Tabular Editor and once we return to Power BI and drag the modified column into a slicer, we have the additional option to make it a “Singel Value” slicer: This is how the new slicer option can then be used: Conclusion I personally find the option to use a column as a single value slicer really amazing. However, one must be aware that there are […]
This post is also available in: Deutsch I like working pretty much with the what-if parameter in Power BI. With the help of this, it is possible to run through corresponding scenarios in a very fine-grained manner. What would my operating result look like if I can increase my sales by a factor of 2? How would it look with 1.5? And how about 2.35? I am aware that these increases are extremes. But with the what-if parameter, such evaluations go very easily with a single slider. Problem the what-if parameter does not work, the exact number cannot be set However, there is occasionally the case that exact values cannot be set. Let’s take the case just mentioned as an example. I would like to evaluate the development of my sales, accurate to 0.01 points. Accordingly, I create a what-if parameter: As range I would like to be able to select from -20 to 20 and the individual values should increase by 0.01 points: Now when I try to adjust the slicer of the what-if parameter to 1, 1.5 or 2.35 something strange happens, I don’t get the slicer set exactly to the value I want: Reason: Limitation to […]