The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts,
I have come across a doubt where i created a column to show the entire month data if you're selecting any date from that particular month.
e,g : if select Jan 10---it should show entire month data 1st to 31st Jan
i tried by fullmonth=calculate(sum(data[salesamount]),datesbetween(dimdate[date],startofmonth,endofmonth))
strtofmonth=STARTOFMONTH(dimdate[Date])
endofmonth=ENDOFMONTH(dimdate[Date])
Kindly let me know on this, is the right approach or if any changes need to be done.
Thanks.
Kousar
Solved! Go to Solution.
Hi @kousar99 ,
Have you solved your problem?
If so, please mark it as a solution so that more people can find the answer quickly.
If not, please try the following method.
1 create a independed date table for a slicer to special a date.
2 create a measure like this
Measure =
CALCULATE (
SUM ( 'Fact table'[values] ),
FILTER (
'Fact table',
[Date]
IN CALENDAR ( STARTOFMONTH ( 'Slicer'[Date] ), ENDOFMONTH ( 'Slicer'[Date] ) )
)
)
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @kousar99 ,
Have you solved your problem?
If so, please mark it as a solution so that more people can find the answer quickly.
If not, please try the following method.
1 create a independed date table for a slicer to special a date.
2 create a measure like this
Measure =
CALCULATE (
SUM ( 'Fact table'[values] ),
FILTER (
'Fact table',
[Date]
IN CALENDAR ( STARTOFMONTH ( 'Slicer'[Date] ), ENDOFMONTH ( 'Slicer'[Date] ) )
)
)
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@kousar99 if you have in your date dimension a column for uniqu year/montn then you could write:
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |