Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kousar99
Helper I
Helper I

How to show entire month data if you are selecting any date of the particular month.

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

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

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:

vchenwuzmsft_0-1655800534824.png

 

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.

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

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:

vchenwuzmsft_0-1655800534824.png

 

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.

SpartaBI
Community Champion
Community Champion

@kousar99 if you have in your date dimension a column for uniqu year/montn then you could write:

Sales Amount Full Month = CALCULATE([Sales Amount], REMOVEFILTERS('Date'), VALUES('Date'[Year Month]))


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.