Advanced Power BI Techniques: Comparing Cumulative Event Values Across Periods!
Power BI Bro Power BI Bro
3.59K subscribers
1,232 views
0

 Published On Apr 28, 2024

Advanced Power BI Techniques: Comparing Cumulative Event Values Across Periods!

Elevate your Power BI skills with our advanced tutorial on comparing cumulative event values across periods. In this in-depth guide, we'll show you how to analyze and visualize cumulative event data over different time frames to identify trends, patterns, and anomalies. Learn advanced DAX techniques to calculate cumulative sums and rolling averages, allowing you to gain deeper insights into your data. We'll explore various visualization methods, including line charts, area charts, and combo charts, to effectively present your findings and communicate key insights to stakeholders. With practical examples and step-by-step instructions, you'll master the art of comparing cumulative event values across periods and take your data analysis skills to the next level in Power BI. Whether you're a data analyst, business intelligence professional, or Power BI enthusiast, this tutorial will equip you with the knowledge and tools needed to unlock valuable insights from your data and make informed decisions for your organization. Join us on this educational journey and empower yourself with advanced Power BI techniques!

Follow along using the same file!

* repo: https://github.com/powerbibro/powerbibro

* filename: PBI - 20240428 - Mr Beast - Comparing Cumulative Views.pbix

* direct link to repo file: https://github.com/powerbibro/powerbi...

SQL BI - Comparing Cumulative Values For Events In Different Periods
https://www.sqlbi.com/articles/compar...

KAGGLE - Mr Beast Youtube Channel Dataset
https://www.kaggle.com/datasets/yasir...

Timestamps:
0:00 - Introduction to Cumulative Comparison
1:43 - Power BI Report File Overview
7:20 - Days Since Published DAX Calculation
11:01 - Create a Table - Days Since Published
15:30 - Create a DAX Calc - Views Since Published
21:38 - Create a DAX Calc - Average Views Since Published For All Videos
29:32 - Create Variance DAX Calculations
32:00 - Create a HASONEFILTER DAX Calc for Average Comparison
34:10 - Outro - Thank you and Subscribe!

*******DAX CALCS*******

*******DAX - Days Since Published *******

Days Since Publication =
VAR _HistoricalDate = RELATED('2 - Historical Date'[Date]) -- view metrics

VAR _Days =
( _HistoricalDate - '1 - Mr Beast Videos'[Date Published] ) -- metric date - date published

RETURN
FORMAT(_Days,"General Number") -- format as number vs date


*******DAX - Views Since Published*******

Views Since Publication =

VAR _max = MAX('1 - Mr Beast Videos'[Days Since Publication])
VAR _calc =

CALCULATE
(
[# Views],
FILTER
(
ALL('3 - Days Since Published'),
'3 - Days Since Published'[Days Since Publication] **(use greater than or equal to sign)** _max
)
)

RETURN
IF(ISBLANK(_max),BLANK(),_calc)

*******DAX - Avg Views Since Published*******

Avg Views Since Pub (All) =

var _max = MAX('3 - Days Since Published'[Days Since Publication])

var _calc =
CALCULATE (
AVERAGEX (
VALUES ( '1 - Mr Beast Videos'[Video ID] ),
[# Views Since Publication]
),
FILTER(ALL ( '1 - Mr Beast Videos'),'1 - Mr Beast Videos'[Days Since Publication] **(use greater than or equal to sign)** _max)
)

return
IF(ISBLANK(_max),BLANK(),_calc)

#powerbi #powerbidesktop #powerbibro #powerbitutorial
#datavisualization #dataanalytics #businessintelligence #microsoftfabric #dax #copilot

show more

Share/Embed