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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Umarjiman
Regular Visitor

to get subtotal for fact table that correlates to date range

Hi everyone. How to put subtotal for January and February by using DAX?  Screenshot 2024-02-09 174003.png

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

Hi @Umarjiman ,

 

I see that this thread doesn't seem to have been resolved. @Daniel29195 's reply is very helpful, and you can follow his suggestion to check the Column Subtotal option. If that's fine, you'll see something like this.

vstephenmsft_0-1707719218380.png

 

Best Regards,

Stephen Tao

 

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

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @Umarjiman ,

 

I see that this thread doesn't seem to have been resolved. @Daniel29195 's reply is very helpful, and you can follow his suggestion to check the Column Subtotal option. If that's fine, you'll see something like this.

vstephenmsft_0-1707719218380.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Daniel29195
Super User
Super User

@Umarjiman 

 

im not sure if i understood your question .

 

setting subtotals are builtin in the power bi matrix visual . you can specify the level that you want your subtotals to show on . 

Daniel29195_0-1707472970741.png

 

 

let me know if this works. 

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

i've downloaded the latest pbi, and i still dont have that option. my task is to actually show the weekStartDate, but when I do it, the WeekStartDate for 29/01 aka 29th January on February column does not positioned itself correctly. it should be to the left of 05/02 aka 5th February. how do I solve this? Screenshot 2024-02-13 115251.png

 

Hi @Umarjiman ,

 

I reproduced the matrix effect you wanted, and then I found the problem.

Your Week Start Date column should be similar to my formula below, and the start date of the 5th week is indeed January 29th, and the logic is correct.

vstephenmsft_0-1708413319756.png

You can work around this by grouping the months. Here's the modified calculated column.

Week Start Date = CALCULATE(MIN('Date Table'[Date]),FILTER('Date Table',[Year]=EARLIER('Date Table'[Year])&&[Week Number]=EARLIER('Date Table'[Week Number])&&[Month]=EARLIER('Date Table'[Month])))

vstephenmsft_1-1708413738670.png

And here's the result in the matrix.

vstephenmsft_2-1708413870389.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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