Posts

Showing posts from April, 2021

DAX Patterns: Like for Like Comparison

  https://www.daxpatterns.com/like-for-like-comparison/

Unit Fiscal Week Sales Calculated Table and Query

Unit Fiscal Week Sales =   FILTER( ADDCOLUMNS( SUMMARIZE( 'Financial Summary', 'Unit'[UnitId], 'Calendar'[Fiscal Week End Date] ), "Weekly Sales", [Sales] ), [Weekly Sales] > 0 ) -- query to determine the Units that have sales > $0 in every week of the report date range DEFINE      VAR Units =          CALCULATETABLE (              VALUES ( Unit[UnitId] ) ,              Unit[Market] = "Domestic" ,     -- report filter              Unit[Brand] = "Carl's Jr."      -- page filter: "Carl's Jr." or "Hardee's"          )      VAR ReportDateRange =          ...

Understanding Data Lineage in DAX

  https://www.youtube.com/watch?v=Hqs0lJJq1YA

When to Use KEEPFILTERS Over Iterators

  https://www.sqlbi.com/articles/when-to-use-keepfilters-over-iterators/

Managing "all" Functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/  

Using the SELECTEDVALUE function in DAX

https://www.youtube.com/watch?v=Zhp1fAfN8Hw   https://www.sqlbi.com/articles/using-the-selectedvalue-function-in-dax/ Example of how to take a column from a dimension and render it in the VALUES area of a matrix. In one case uses CROSSFILTER.

Paginated Report Resources

  https://hatfullofdata.blog/paginated-report-resources/

Propagating Filters Using TREATAS in DAX

  https://www.youtube.com/watch?v=Hqs0lJJq1YA https://www.sqlbi.com/articles/understanding-data-lineage-in-dax/ Shows how to move a filter using a physical relationship (fastest), TREATAS, INTERSECT or CONTAINS.

Side Effects of the Sort By Column Setting in DAX

https://www.sqlbi.com/articles/side-effects-in-dax-of-the-sort-by-column-setting/  

Scenarios of Using Calculated Tables in Power BI

  https://radacad.com/scenarios-of-using-calculated-tables-in-power-bi

The Many to Many Revolution

https://www.sqlbi.com/whitepapers/many2many/  

From SQL to DAX: Filtering Data

https://www.sqlbi.com/articles/from-sql-to-dax-filtering-data/  

Adding KPI Indicators to Native Line Charts in Power BI

https://www.youtube.com/watch?v=4MtU5wdbZIQ  

Comparing Different Time Periods

  https://www.daxpatterns.com/comparing-different-time-periods/

Analyze in Excel

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-analyze-in-excel  

Creating Sliding Toggles With Native Buttons in Power BI

https://www.havensconsulting.net/blog-and-media/creating-sliding-toggles-with-native-buttons  

Dynamic "Column" Headers for Time Periods in Power BI

https://www.youtube.com/watch?v=4emPkBiiCtg&t=123s  

Mastering Power BI Bookmarks

  https://www.youtube.com/watch?v=xCMqWEvSkAs

Create Filter for CALCULATE Where CY Sales AND PY Sales > $0 in Relevant Week Range

  RM Average Sales for Units With Sales > $0 = -- Get the UnitIds. VAR Units = VALUES('Unit'[UnitId]) -- Get the Fiscal Week Num Overall for the Current Fiscal Week. This will be -- an incomplete week (we always want the last completed week). On the Tuesday -- morning refresh, the Fiscal Week Num Overall will increment to the next week -- which has just begun. VAR FiscalWeekNumber = CALCULATETABLE(     SUMMARIZE(     'Calendar',     'Calendar'[Fiscal Week Num Overall]     ), ALL('Calendar'),     'Calendar'[Current Fiscal Week] = TRUE() ) -- Get the list of the last 9 Fiscal Week End Dates prior to the current one. -- This is the date range to check for Sales > $0. VAR FiscalWeekEndDates = CALCULATETABLE(     SUMMARIZE( 'Calendar', 'Calendar'[Fiscal Week End Date]     ), ALL('Calendar'),     AND(...

Running Totals Using VARIABLES, CALCULATE, and FILTER

  https://blog.pragmaticworks.com/powerbi-dax-variables-calculate-and-filter Call CALCULATE while creating a calculated column. Use FILTER to create a table filter for CALCULATE.

Microsoft Power BI BLOG

  https://powerbi.microsoft.com/en-us/blog/

Blend Power BI datasets with Excel files? INSANE AMAZING!

  https://www.youtube.com/watch?v=ZSyYegfA6PQ

Power BI Get Data: Import vs. DirectQuery vs. Live (2021)

  https://www.youtube.com/watch?v=-ip7mKUdwRg Includes short blurb on connecting Power BI Datasets to your own data in the model

Unboxing new Power BI composite models

  https://www.youtube.com/watch?v=g-nRxDVt3To New in Dec 2020 release of Power BI, you can combine a tabular model with import. https://www.sqlbi.com/articles/new-composite-models-in-power-bi-a-milestone-in-business-intelligence/

Using DirectQuery for Power BI datasets and Azure Analysis Services (preview)

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-datasets-azure-analysis-services   With  DirectQuery for Power BI datasets and Azure Analysis Services (AAS) , you can use DirectQuery to connect to AAS or Power BI datasets and if you want, combine it with other DirectQuery and imported data. Report authors who want to combine the data from their enterprise semantic model with other data they own, such as an Excel spreadsheet, or want to personalize or enrich the metadata from their enterprise semantic model, will find this feature especially useful.

Relationships in Power BI and Tabular

https://www.sqlbi.com/articles/relationships-in-power-bi-and-tabular-models/  

Using GENERATE and ROW instead of ADDCOLUMNS in DAX

  https://www.youtube.com/watch?v=AieQMS6rGvM https://www.sqlbi.com/articles/using-generate-and-row-instead-of-addcolumns-in-dax/   Preferred solution: Calendar   5   = VAR   BaseCalendar  =      CALENDAR   (   DATE   (   2016 ,   1 ,   1   ) ,   DATE   (   2018 ,   12 ,   31   )   ) RETURN      GENERATE   (          BaseCalendar ,          VAR   BaseDate  =   [Date]          VAR   YearDate  =   YEAR   (   BaseDate  )          VAR   MonthNumber  =   MONTH   (   BaseDate  )          VAR   MonthName  =   FORMAT   (   BaseDate ,   "mmmm"   ) ...

Hiding Future Dates for Calculations in DAX

https://www.sqlbi.com/articles/hiding-future-dates-for-calculations-in-dax/  

Introducing SUMMARIZECOLUMNS

https://www.sqlbi.com/articles/introducing-summarizecolumns/   still not fully supported in a modified filter context. For example, it cannot be used within a measure in an expression of  ADDCOLUMNS .

Best Practices Using SUMMARIZE and ADDCOLUMNS

  https://www.sqlbi.com/articles/best-practices-using-summarize-and-addcolumns/

Computing rolling average in DAX

https://www.youtube.com/watch?v=ACvYaXnpyCM  

Unboxing new Power BI composite models

  https://www.youtube.com/watch?v=g-nRxDVt3To

Power BI: Hiding future dates for calculations in DAX

  https://www.youtube.com/watch?v=VXd1wl-5vKI

Showing actuals and forecasts in the same chart with Power BI

  https://www.youtube.com/watch?v=DKgF-5QHY68

Creating Table Functions in DAX Using Detail Rows

https://www.sqlbi.com/articles/creating-table-functions-in-dax-using-detailrows/  

Applying a Measure Filter in Power BI

https://www.sqlbi.com/articles/applying-a-measure-filter-in-power-bi/  

Propagating Filters Using TREATAS in DAX

  https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

Apply AND Logic to Multiple Selection in DAX Slicer

  https://www.youtube.com/watch?v=tONOosN1xAs https://www.sqlbi.com/articles/apply-and-logic-to-multiple-selection-in-dax-slicer/

Using OR conditions between slicers in DAX

  https://www.youtube.com/watch?v=l5JX3G5Ntzk https://www.sqlbi.com/articles/using-or-conditions-between-slicers-in-dax/ Set-Based Solution: Create table to be used as a filter in CALCULATE: UNION Crossjoin the selections in the Product[Brand] slicer with any Customer[Occupation] Crossjoin the selections in the Customer[Occupation] slicer with any Product[Brand] OR   # 1   := CALCULATE   (      [Units] ,      UNION   (          CROSSJOIN   (   VALUES   (   'Product'[Brand]   ) ,   ALL   (   Customer[Occupation]   )   ) ,          CROSSJOIN   (   ALL   (   'Product'[Brand]   ) ,   VALUES   (   Customer[Occupation]   )   )      ) )

Creating a slicer that filters multiple columns in Power BI

  https://www.youtube.com/watch?v=UvvS376vYSw

Power BI slicers vs the filter pane (2021)

  https://www.youtube.com/watch?v=NA2wlqfjX34

Power BI Tutorial: Dynamically Filter By Today's Date

  https://www.youtube.com/watch?v=lkHFpmA4SJ4 In this Power BI Tutorial, Patrick looks at how to dynamically filter by today's date. Using a date table, you can create a DAX measure that can then be used as a Power BI report-level filter to dynamically filter by today's date within Power BI Desktop

Comparing Different Time Periods

https://www.daxpatterns.com/comparing-different-time-periods/ Compare measure amounts using 2 different time periods. Add a new Date table (e.g. Comparison Date) that is a duplicate of the existing date table.  The relationship between Date and Comparison Date is Many-to-1 and Inactive. Cross filter direction = Single. Activate the relationship in the measure. Add 2 slicers; one uses Date table, the other uses Comparison Date table. Compare measures using the 2 Date tables. Comparison Sales Amount = CALCULATE([Sales Amount], REMOVEFILTERS('Date'),  USERELATIONSHIP('Date'[Date], 'Comparison Date'[Comparison Date]) )

Havens Consulting on YouTube

  https://www.youtube.com/channel/UCjlfQwqb-0S40XQ8seYPLSw

Filtering and Comparing Different Time Periods

  https://www.sqlbi.com/articles/filtering-and-comparing-different-time-periods-with-power-bi/

Syncing Slicers in Power BI (Filter Slicers without using bidirectional filters)

https://www.sqlbi.com/articles/syncing-slicers-in-power-bi/   Create measures that you can put in the filter for slicers to limit the items in the slicer. Just check whether the table is NOT empty. For instance, you can filter a slicer on Color to just the colors that have actually been sold by checking whether the Sales table is NOT empty. MEASURE:  Slicer Sales = INT (NOT ISEMPTY ( Sales )) Add measure to the Filters on this visual for the slicer and specify Show items when the value is 1

Showing actuals and forecasts in the same chart with Power BI

  https://www.youtube.com/watch?v=DKgF-5QHY68 https://www.sqlbi.com/articles/showing-actuals-and-forecasts-in-the-same-chart-with-power-bi/

Power BI: Use DAX to get relative dates

  https://www.youtube.com/watch?v=wQ9DohPvx8Q Use case is to show sales for the last 12 months and the sales forecast for the next 12 months. Add a calculated column (e.g. 24 Month Reports) to the Calendar table to indicate whether the date is in the range of previous 12 months or next 12 months. The value will be 1 if TRUE or 0 if FALSE. Filter the visual to check if 24 Month Reports is 1.

Swap Power BI Visuals to add FLEXIBILITY in your reports

  https://www.youtube.com/watch?v=GnPuU3X74SY

Hiding Future Dates for Calculations in DAX

https://www.sqlbi.com/articles/hiding-future-dates-for-calculations-in-dax/  

NEXT LEVEL Power BI Date Picker!

  https://www.youtube.com/watch?v=mXi8sMmOOTU

Going CRAZY with Power BI slicers not filtering other slicers????

  https://www.youtube.com/watch?v=o8K4Px_6AYQ Add measure to Filters on the slicer visual; e.g. MEASURENAME > 0