Saturday, November 28, 2020
Thursday, November 19, 2020
Guy in a Cube - YouTube Videos
Use DAX to Get Relative Dates: https://www.youtube.com/watch?v=wQ9DohPvx8Q
Making Data Source Parameters Easy: https://www.youtube.com/watch?v=OnaDJkGOmIE
Dynamic Power BI reports using Parameters: https://www.youtube.com/watch?v=iiNDq2VrZPY
Call stored proc, get parameters from Excel.
Populate a Power BI parameter list using a query
The How and Why of Power BI Aggregations
Configure Power BI Aggregations
Build a Date Picker (uses popup calendar and TREATAS)
NEXT LEVEL Power BI Date Picker!
Wednesday, November 18, 2020
Thursday, November 12, 2020
Wednesday, November 11, 2020
Friday, September 18, 2020
Friday, September 4, 2020
Monday, August 31, 2020
Wednesday, August 26, 2020
Power BI - How to Set a Default Slicer Value (8:49)
https://www.youtube.com/watch?v=pCgK-Ze3nhA
Date example - add a DateRange calculated column with this DAX:
DateRange = IF(MONTH(Date[Date]) = MONTH(TODAY()) && YEAR(Date[Date]) = YEAR(TODAY()), "Current Month", MONTH(TODAY()) - MONTH(Date[Date]) & " Months ago")
Tuesday, August 25, 2020
Select Measure to Render Based on Rows
-- create a datatable to populate the rows of a matrix
Metric Slicer =
DATATABLE("Metric", STRING,
{
{ "Units" },
{ "Gross $" }
}
)
-- create a measure to return the correct measure based on the row in a matrix
Loan Metric Selector =
SWITCH(
SELECTEDVALUE(
'Metric Slicer'[Metric]
),
"Units", [Loans Closed Count],
"Gross $", [Total Loan Amount]
)
Total Quantity on Weekdays
Total Quantity (Weekday) =
CALCULATE(
[Total Quantity],
FILTER(
'Internet Sales',
RELATED('Date'[DayNumberOfWeek]) > 1 &&
RELATED('Date'[DayNumberOfWeek]) < 7))
-- filter on the one side of the relationship
Total Quantity (Weekday) =
CALCULATE(
[Total Quantity],
FILTER(
'Date',
AND('Date'[DayNumberOfWeek] > 1,
'Date'[DayNumberOfWeek] < 7)))
7 Day Moving Average
Sales 7-Day Moving Average =
VAR StartDate = DATEADD(LASTDATE('Date'[Date]), -6, DAY)
VAR EndDate = LASTDATE('Date'[Date])
RETURN
AVERAGEX(
DATESBETWEEN(
'Date'[Date],
StartDate,
EndDate),
[Total Sales])
Use CONCATENATEX for Debugging
3 Month Sales Rolling Average (ConcatenateX) =
VAR EndDate = LASTDATE('Date'[Date])
RETURN
CALCULATE(
CONCATENATEX(
VALUES('Date'[MonthNumberOfYear]),
'Date'[MonthNumberOfYear], ", ", 'Date'[MonthNumberOfYear]),
DATESINPERIOD(
'Date'[Date],
EndDate,
-3,
MONTH))
Total Sales All Time (remove blanks)
Total Sales (All Time) =
IF(
[Total Sales] = BLANK(),
BLANK(),
CALCULATE(
[Total Sales],
ALL('Date'[CalendarYear] ) ) )
3 Month Rolling Average
3 Month Sales Rolling Average (Values) =
VAR EndDate = LASTDATE('Date'[Date])
RETURN
CALCULATE(
CONCATENATEX(
VALUES('Date'[MonthNumberOfYear]),
'Date'[MonthNumberOfYear], ", "), //[Total Sales]),
DATESINPERIOD(
'Date'[Date],
EndDate,
-3,
MONTH))
Rolling 12 Months Profit
Rolling 12 Months Profit =
VAR StartDate = NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE('Date'[Date])))
VAR EndDate = LASTDATE('Date'[Date])
RETURN
CALCULATE(
[Profit],
DATESBETWEEN(
'Date'[Date],
StartDate,
EndDate))
Monday, August 17, 2020
Wednesday, August 12, 2020
Tuesday, August 11, 2020
Sunday, July 26, 2020
Monday, July 13, 2020
Friday, June 26, 2020
Saturday, June 20, 2020
Subscribe to:
Comments (Atom)