This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
The model view now has even more to offer! We are excited to share the public preview of the Model explorer in the model view of Power BI Desktop.
The Model explorer gives full visibility of the dataset, also known as semantic model, items in a single tree view. See what all has been done on your semantic model at-a-glance.
The_Power_BI_Desktop_Model_Explorer
Model explorer boosts productivity when authoring semantic models in many ways.
The Semantic model section has a new properties pane that allows you to see and adjust the model level properties.
Model_Explorer_semantic_model_properties_pane
The Relationships section also now has the option to create a new relationship in the properties pane. This gives the benefit of no queries running to fetch a data preview or validating the relationship as you click that you get with editing relationships in the properties pane but now also for creating a new relationship. The existing paths to create a relationship are still available, this just offers an additional way that may be most helpful to users with tables in DirectQuery or Direct Lake storage mode.
Create_a_relationship_using_the_properties_pane_via_Model_Explorer
Some of these semantic model items do not have a direct way to create or edit them within Power BI Desktop. These items are:
And finally, for one of these semantic model items we are introducing creating and editing within Power BI Desktop. We are very excited to announce the public preview of authoring the powerful calculation groups feature in Power BI Desktop.
Support for creating calculation groups in Power BI Desktop has been a highly voted idea with over 3,500 votes. Thank you Marco Russo for the popular idea and your continuous support and amazing contributions in helping users understand DAX and modeling in Power BI!
Support_creating_calculation_groups_in_Power_BI_Desktop_idea_with_3501_votes
To add a calculation group to your model, simply click the Calculation group button in the ribbon of model view.
Add_a_calculation_group_by_clicking_the_Calculation_group_button_in_the_ribbon
A dialog will show letting you know your model will now discourage implicit measures when a calculation group is added. Click Yes to continue.
A_dialog_asking_you_to_discourage_implicit_measures
Implicit measures are when you drag a data column directly into a visual and the visual aggregates it as a SUM, AVERAGE, MIN, etc. Discourage implicit measures will not allow report creators to add data columns to visuals as aggregate values. Existing visuals with implicit measures will still show the values. Unfortunately, calculation items are not applied to implicit measures, which is why this setting is required. Calculation items only apply to measures, sometimes termed explicit measures. A measure is created by clicking on New measure in the ribbon and you define the DAX expression to aggregate a data column. You can also include conditional elements and filters when you aggregate a data column in a measure, giving you the full analytical capabilities DAX provides. Calculation items then apply their additional DAX expression logic on these measures.
When the calculation group is created the first calculation item is also automatically created and you can start typing the DAX expression in the DAX formula bar. This automatically created calculation item uses SELECTEDMEASURE(), which simply is the measure the calculation item is applied to without any modification, to get you started.
A_new_calculation_group_automatically_creates_the_first_calculation_item
Here are some examples to get you going on creating calculation groups in your own models.
1) Create a Daily Averages calculation group. When looking at monthly or yearly values, it’s helpful to see what the daily or monthly averages were as well as just the totals. This is easily done with a couple new DAX measures for Orders.
Orders =DISTINCTCOUNT ( 'Sales Order'[Sales Order] )Orders: Daily Average =AVERAGEX ( VALUES ( 'Date'[Date] ), [Orders])Orders: Monthly Average =
AVERAGEX (
VALUES ( 'Date'[Month] ),
[Orders]
)
Unfortunately, if I wanted this on another measure, I would have to create two more measures again. And so on for each additional measure. Instead of creating additional measures, I can make two calculation items in a calculation group that then can be applied to any of the other measures.
Total =SELECTEDMEASURE ()Daily average =
AVERAGEX (
VALUES ( 'Date'[Date] ),
SELECTEDMEASURE ()
)
Monthly average =AVERAGEX ( VALUES ( 'Date'[Month] ), SELECTEDMEASURE ())Orders =DISTINCTCOUNT ( 'Sales Order'[Sales Order] )Sales Amount =SUM ( Sales[Sales Amount] )Current =SELECTEDMEASURE ()MTD =CALCULATE ( SELECTEDMEASURE (), DATESMTD ( 'Date'[Date] ))QTD =CALCULATE ( SELECTEDMEASURE (), DATESQTD ( 'Date'[Date] ))YTD =CALCULATE ( SELECTEDMEASURE (), DATESYTD ( 'Date'[Date] ))PY =CALCULATE ( SELECTEDMEASURE (), SAMEPERIODLASTYEAR ( 'Date'[Date] ))PY MTD =CALCULATE ( SELECTEDMEASURE (), SAMEPERIODLASTYEAR ( 'Date'[Date] ), 'Time Intelligence'[Show as] = "MTD")PY QTD =CALCULATE ( SELECTEDMEASURE (), SAMEPERIODLASTYEAR ( 'Date'[Date] ), 'Time Intelligence'[Show as] = "QTD")PY YTD =CALCULATE ( SELECTEDMEASURE (), SAMEPERIODLASTYEAR ( 'Date'[Date] ), 'Time Intelligence'[Show as] = "YTD")YOY =SELECTEDMEASURE () - CALCULATE ( SELECTEDMEASURE (), 'Time intelligence'[Show as] = "PY" )YOY% =DIVIDE ( CALCULATE ( SELECTEDMEASURE (), 'Time Intelligence'[Show as] = "YOY" ), CALCULATE ( SELECTEDMEASURE (), 'Time Intelligence'[Show as] = "PY" ))"#,##0.00%".Orders =DISTINCTCOUNT ( 'Sales Order'[Sales Order] )Sales Amount =SUM ( Sales[Sales Amount] )No conversion (USD) =SELECTEDMEASURE ()Conversion (AVG) =VAR _rate = CALCULATE ( AVERAGE ( 'Currency Rate'[Average Rate] ), CROSSFILTER ( 'Date'[DateKey], 'Currency Rate'[DateKey], BOTH ) )RETURN SELECTEDMEASURE () * _rateConversion (EOD) =VAR _rate = CALCULATE ( AVERAGE ( 'Currency Rate'[End Of Day Rate] ), CROSSFILTER ( 'Date'[DateKey], 'Currency Rate'[DateKey], BOTH ) )RETURN SELECTEDMEASURE () * _rateSELECTEDVALUE ( 'Currency'[Format String], "")Sales Amount =SUM ( Sales[Sales Amount] )Extended Amount =SUM ( Sales[Extended Amount] )1) I have a measure I want to calculation item ignore and not modify. Especially in the case of measures created to generate title text for use in visuals, there are measures you may want the calculation item to ignore. Visuals may result in error if the calculation item tries to do mathematical operations on a text measure. And in the case of the currency conversion, you may want it to only apply the conversion to currency measures and ignore other measures such as order counts. You can account for these cases in the calculation item DAX expression.
Title for Conversion =SELECTEDVALUE ( Parameter[Parameter Fields] ) & " Conversion table"Conversion (AVG) =VAR _rate = CALCULATE ( AVERAGE ( 'Currency Rate'[Average Rate] ), CROSSFILTER ( 'Date'[DateKey], 'Currency Rate'[DateKey], BOTH ) )RETURN // if the measure name contains "Amount" IF ( SEARCH ( "Amount", SELECTEDMEASURENAME (), 1, -1 ) > -1, // convert it SELECTEDMEASURE () * _rate, // otherwise leave it alone SELECTEDMEASURE () )// if the measure name contains "Amount"IF ( SEARCH ( "Amount", SELECTEDMEASURENAME (), 1, -1 ) > -1, // Format it like a currency of the selected country SELECTEDVALUE ( 'Currency'[Format String], "" ), // Else leave the formatting alone SELECTEDMEASUREFORMATSTRING ())Conversion (EOD) =VAR _rate = CALCULATE ( AVERAGE ( 'Currency Rate'[End Of Day Rate] ), CROSSFILTER ( 'Date'[DateKey], 'Currency Rate'[DateKey], BOTH ) )RETURN // if the measure name contains "Amount" IF ( SEARCH ( "Amount", SELECTEDMEASURENAME (), 1, -1 ) > -1, // convert it SELECTEDMEASURE () * _rate, // otherwise leave it alone SELECTEDMEASURE () )// if the measure name contains "Amount"IF ( SEARCH ( "Amount", SELECTEDMEASURENAME (), 1, -1 ) > -1, // Format it like a currency of the selected country SELECTEDVALUE ( 'Currency'[Format String], "" ), // Else leave the formatting alone SELECTEDMEASUREFORMATSTRING ())For example, take Sales Amount. This is a SUM of the Sales Amount column.
Sales Amount =SUM ( Sales[Sales Amount] )Sales Amount YTD =CALCULATE ( [Sales Amount], 'Time intelligence'[Show as] = "YTD")Try model explorer and calculation groups starting today! Be sure to turn on the feature in the Preview Features section of the Options in Power BI Desktop, and comment with any feedback!
A_screenshot_of_a_computer_Description_automatically_generated
Deep_dive_into_the_Model_Explorer_with_calculation_group_authoring_and_creating
Learn more about these features in our documentation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.