Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi,
I have sales from jan 2021 to oct 2021, now I want to show 2nd half of month sales (i.e, for Sep month need to show sales from 16/09/2021 to 30/09/2021, for Oct month from 16/10/2021 to 31/10/2021) for current 6 months duration.
Please help me to do it.
Thanks,
AshDil.
Solved! Go to Solution.
@AshDil , Create a measure like this with help from date table
LAst 6 month onlt last 15 days =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
or
LAst 6 month onlt last 15 days =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
return
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
or
LAst 6 month onlt last 15 days =
var _max = eomonth(today(),-1)
var _min = eomonth(_max,-6) +1
var _day = 16
return
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
You need to Add Filter in your measure.
Try Create something like
_Sales 2nd Half = CALCULATE(SUM('Table'[Amount]),FILTER(Date,DAY(Date[Date])>15))
Proud to be a Super User!
@AshDil , Create a measure like this with help from date table
LAst 6 month onlt last 15 days =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
or
LAst 6 month onlt last 15 days =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
return
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
or
LAst 6 month onlt last 15 days =
var _max = eomonth(today(),-1)
var _min = eomonth(_max,-6) +1
var _day = 16
return
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
65 | |
42 | |
42 |
User | Count |
---|---|
46 | |
40 | |
28 | |
27 | |
26 |