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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

How to divide a value of a column dynamically based on date and the count of another column

Hello,

 

I am trying to divide the "Budget per channel" for the channel "Distant Sales - E-shop - Web with delivery". I want to divide it per number of Stores (1,2,3 etc) per day in order not to have always the Total Budget for all stores for all days of the selected date range, displayed for the channel "Distant Sales - E-shop -Web with

delivery" when I drill down to stores.2.png 

Is there any way to do that?

 

Notes.

a. The number 4.270.881 is the Budget for all stores for the selecte date range for the "Distant Sales - E-shop - Web with delivery".

b. I have calculated the measure "Budget by channel" with a switch statement where I add the Budget for the different channels (E-shop etc) from different tables, that is way it is working for other channels.

 

Thank you!

 

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can calculate the number of stores in the selected date, then divide your calculated measure by the number of stores.

The measure may like below:

measure =
var stores_ = CALCULATE (DISTINCTCOUNT (Sales[store]),ALLSELECTED ('Date'[Date]))
return DIVIDE ([your measure],stores_)

 

Best Regards,
Liang
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

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can calculate the number of stores in the selected date, then divide your calculated measure by the number of stores.

The measure may like below:

measure =
var stores_ = CALCULATE (DISTINCTCOUNT (Sales[store]),ALLSELECTED ('Date'[Date]))
return DIVIDE ([your measure],stores_)

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors