The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Folks,
I am connecting from snowflake Datamart to Power BI Using View. I have retriving Created_dt, Year,Month,ID,Name, sum(Units) from the view.
It is subscription based business. I want to display Beginning of Month units, Added in the Month Units, End of the month units. Growth
Can you please help me How to create dax calculation to achive the oupt report. It is for all the months across the years.
Thank you very much in advance.
Data:
Created_dt | Year_Created | Month_Created | ID | Name | UNITS |
6/14/2022 | 2022 | 6 | 1175 | Planet Entertainment | 52973 |
7/26/2022 | 2022 | 7 | 1185 | sony Entertainement | 5758 |
9/19/2022 | 2022 | 9 | 204 | Amazon Entertainement | 27594 |
10/26/2022 | 2022 | 10 | 1224 | Netflix | 25692 |
10/30/2022 | 2022 | 10 | 1228 | Z5 | 0 |
1/4/2023 | 2023 | 1 | 1282 | Aha | 22475 |
3/13/2023 | 2023 | 3 | 1336 | JioHotstar | 4280 |
4/3/2023 | 2023 | 4 | 1373 | MX Player | 0 |
6/9/2022 | 2022 | 6 | 1172 | Voot | 26240 |
8/1/2022 | 2022 | 8 | 1189 | Youtube | 204104 |
10/25/2022 | 2022 | 10 | 1221 | Eros Now | 36778 |
10/30/2022 | 2022 | 10 | 1227 | Alt Balaji | 448957 |
1/19/2023 | 2023 | 1 | 1111 | Discovery ++ | 232743 |
Required OutPut Report:
Solved! Go to Solution.
@Gopal_PV Try:
Beginning Month Units Measure =
VAR __Date = MIN( 'Data'[Created_dt] )
VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
__Result
Ending Month Units Measure =
VAR __Date = MAX( 'Data'[Created_dt] )
VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
__Result
Growth Measure = [Ending Month Units Measure] - [Beginning Month Units Measure]
@Gopal_PV Try:
Beginning Month Units Measure =
VAR __Date = MIN( 'Data'[Created_dt] )
VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
__Result
Ending Month Units Measure =
VAR __Date = MAX( 'Data'[Created_dt] )
VAR __Result = MAXX( FILTER( 'Data', [Created_dt] = __Date ), [UNITS] )
RETURN
__Result
Growth Measure = [Ending Month Units Measure] - [Beginning Month Units Measure]
User | Count |
---|---|
20 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
28 | |
12 | |
12 | |
9 | |
8 |