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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.