Hi, I need to create 2 measures (to be inserted in a table) based on a data "Sales" that I currently have for each single month of the current year:
measure 1 - sales from 1 January current year to today's date
measure 2 - sales of the current month only
How can I do?
thanks to who helps me.
Solved! Go to Solution.
@Morgana_2022 do you have a date dimension table?
If yes, then:
measure 0 = SUM('Table'[Sales])
measure 1 = CALCULATE([measure 0], DATESYTD('Date'[Date'))
measure 2 =
VAR _current_month = SELECTEDVALUE('Date'[Month-Year])
RETURN
CALCULATE(
[measure 0],
REMOVEFILTERS('Date'),
'Date'[Month-Year] = _current_month
)
@Morgana_2022 do you have a date dimension table?
If yes, then:
measure 0 = SUM('Table'[Sales])
measure 1 = CALCULATE([measure 0], DATESYTD('Date'[Date'))
measure 2 =
VAR _current_month = SELECTEDVALUE('Date'[Month-Year])
RETURN
CALCULATE(
[measure 0],
REMOVEFILTERS('Date'),
'Date'[Month-Year] = _current_month
)
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
101 | |
58 | |
44 | |
28 | |
24 |
User | Count |
---|---|
130 | |
94 | |
75 | |
43 | |
39 |