Posts

Showing posts with the label FAVORITE

Working below a DAX formula’s granularity

https://www.youtube.com/watch?v=7i03UBWk85Y   Article:  https://www.sqlbi.com/articles/working-below-a-dax-formulas-granularity/

Get Selected Items and Not Selected Items from Slicer

-- Get the colors selected in the slicer VAR SelectedColors = CALCULATETABLE( VALUES(Product[Color], ALLSELECTED()) -- Get All Colors VAR AllColors = ALL(Product[Color]) -- Get the colors not selected in the slicer VAR NotSelectedColors = EXCEPT(AllColors, SelectedColors)

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.

Using calculation groups to selectively replace measures in DAX expressions

Video:  https://www.youtube.com/watch?v=xS1t25_GsWw Article and Video:  https://www.sqlbi.com/articles/using-calculation-groups-to-selectively-replace-measures-in-dax-expressions/ " Calculation groups replace measure references with the DAX expression of the calculation item that is active in the filter context." Shows the "pattern" for injecting any parameter from the report inside a measure as the following steps: Rename calculation group as "Internal..." and hide it Create disconnected table which is a copy of the Internal calculation group Use  disconnected table in slicer to allow user to choose the calculation desired Create "Internal" measure Use CALCULATE to apply calculation item based on user selection Copy disconnected table: PriceToUse  = SELECTCOLUMNS   (      InternalPriceToUse ,      "PriceToUse" ,   InternalPriceToUse[InternalPriceToUse] ,      "Ordinal" ,   InternalPriceToUse[...