Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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
)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |