
DAX SAMPLES
MEASURE1
Calculate the past 3 quarters (based on the max date in the respective table). Takes into account if data is not available yet for previous months.
MEASURE2
Creates 1 table based on the keys (Server IDs) from the previous month (based on the Max month selected) and 1 table for the current month. Devices found in the previous month but not the current month were removed MoM. Those not in the previous month but in the current month were added MoM.
MEASURE3
Takes the prior month MoM % change or prior Quarter QoQ % change based on whether the month or quarter field are filtered on.
MEASURE4
Determines if a date is the first Tuesday in the month if the week is the first full week of the month.
MEASURE5
Used in place of a KPI in a SSAS cube. Determines if the value is above, between or below the target and thresholds.
MEASURE6
There are multiple years in the dataset with different targets. The main connection between the table and date table was based on reported date. This will only pull the "current" values of year targets. In order to pull previous year's target an inactive relationship was created. The measure helps to pull the target based on that inactive relationship.
Functions used: CALCULATE, VAR, RETURN, DIVIDE, ROUNDDOWN, ISBLANK, ISFILTERED, PARALLELPERIOD, USERELATIONSHIP, IF, CALCULATETABLE, COUNTROWS, EXCEPT, DATEADD