Queen Carine UMUVANDIMWEqueen-carine-the-analyst.hashnode.dev·Nov 12, 2024Giving Data a Voice that People Can Understand As a Data AnalystIntroduction Data storytelling is essential for any data analyst in today's data-driven world. Raw numbers and graphs only go so far; to drive real impact, data needs a narrative that brings insights to life. Data storytelling bridges the gap between...Data Science
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI DAX: CALENDAR, DATE, YEAR, TODAYDateTable = CALENDAR ( DATE ( 2020, 1, 1 ), DATE ( 2022, 12, 31 ) ) To create a Date Table in Power BI using a DAX expression, you can use the CALENDAR or CALENDARAUTO functions. The CALENDAR function allows you to specify a date range, while CALEND...PowerBI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI DAX: TOPN, ASC, DESCTopNValues = TOPN(<N_Value>, <Table>, <OrderBy_Expression>, [<Order>[, <OrderBy_Expression>, [<Order>]]…]) The TOPN function in DAX (Data Analysis Expressions) is used to return the top 'N' rows from a specified table or expression based on a given ...PowerBI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI DAX: CALCULATE, DATESBETWEEN, STARTOFYEAR, PREVIOUSYEAR, LASTDATE, SAMEPERIODLASTYEARSales PYTD = VAR StartYear = STARTOFYEAR ( PREVIOUSYEAR ( 'Calendar'[Date] ) ) VAR EndDate = LASTDATE ( SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) ) RETURN CALCULATE ( [Sales], DATESBETWEEN ( 'Calendar'[Date], StartYear, EndDate ) ) Using t...PowerBI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI Power Query M Code: Table.Group, Table.RowCountlet Source = Sql.Database("YourServer", "YourDatabase"), Impressions = Source{[Schema = "dbo", Item = "Impressions"]}[Data], GroupedImpressions = Table.Group( Impressions, {"Ad_id", "Site_name", "Impression_date"}, {{"Impression...PowerBI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI DAX: CALCULATE, DISTINCTCOUNT, LASTDATECALCULATE ( DISTINCTCOUNT ( Balances[AccountID] ), LASTDATE ( 'Date'[Date] ) ) In data analysis, understanding the number of unique accounts at specific points in time is crucial for tracking performance and making informed decisions. The DAX expres...PowerBI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI DAX: CALCULATE, PARALLELPERIODSales Previous Year = CALCULATE ( [Total Sales], PARALLELPERIOD ( 'Date'[Date], -1, YEAR ) ) The CALCULATE() function in DAX is essential for modifying the context of a calculation, allowing you to apply specific filters or conditions. When integrat...PowerBI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Power BI Using DAX: RLS, LOOKUPVALUE, USERNAME[Country] = LOOKUPVALUE(Managers[Country], Managers[ManagerName], USERNAME()) Row Level Security (RLS) is a feature in Power BI that restricts data access for users at the row level. It ensures that users can only see the data that they are permitte...DataAnalysisExpression-DAX
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 17, 2024Creating Power BI DAX Measures for Current and Previous Quarter SalesPrevious Quarter = CALCULATE ( [Total Sales], PREVIOUSQUARTER ( Date[Date] ) ) To create a measure that displays the sales from the previous quarter, you can use the PREVIOUSQUARTER function in DAX. This function returns a table that contains all th...Power BI
Mohamad Mahmoodhashnotes.hashnode.dev·Sep 16, 2024Power BI DAX: Implicit vs. Explicit FilteringConsider the following two DAX expressions. First expression: Headcount = CALCULATE ( COUNTROWS ( 'Headcount' ), LASTDATE ( 'Date'[Date] ) ) Second expression: RecentSalesCount Measure RecentSalesCount = CALCULATE ( COUNTROWS ( Sales ), Sale...PowerBI