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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
primolee
Helper V
Helper V

Change different multiplier when different date

Hello everyone,

 

I have advertisement spending data of each media Type in the following table.

MediaDateSpending
Outdoor2018/9/1100000
Cable TV2020/1/120000
Newspaper2017/7/130000
Terr2019/8/160000
Radio2018/8/170000
Magazine2018/6/150000
Outdoor2016/12/140000
Cable2020/6/1120000
Newspaper2020/12/180000
Terr.2021/6/1160000
Radio2020/5/120000
Magazine2019/3/140000

 

Because each kind of media has different weight at different period, here is my other table with weight information

Media NameStart DateEnd DateWeight
Outdoor2018/9/12021/6/300.8
Cable2018/9/12021/6/300.068
Newspaper2018/9/12021/6/300.326
Terr.2018/9/12021/6/300.055
Radio2018/9/12021/6/300.217
Magazine2018/9/12021/6/300.631
Outdoor2016/1/12018/8/310.7
Cable2016/1/12018/8/310.06
Newspaper2016/1/12018/8/310.4
Terr.2016/1/12018/8/310.08
Radio2016/1/12018/8/310.3
Magazine2016/1/12018/8/310.65

 

What I want to do is to calculcate the weighted spending using the correct weight depending the date column.

 

For example, media and date of first row of spending data is outdoor 2018/9/1, and weight of outdoor between 2018/9/1 and 2021/6/30 is 0.8, therefore the weighted spending is 80000.

 

Whereas for the third row newspaper, because the date 2017/7/1 is between 2016/1/1 and 2018/8/31, therefore the weight is 0.4.

 

Following is what I hope to accomplish in a BI table visual.

MediaDateSpendingWeightWeighted Spending
Outdoor2018/9/11000000.880000
Cable2020/1/1200000.0681360
Newspaper2017/7/1300000.412000

 

I want to add the "Weight" column to the first table.  Could someone please help me on doing this?

 

Thank you very much for your help.

 

Best regards,

David

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @primolee 

Please check the below picture and the sample pbix file's link dow below.

I created both measures and columns.

All measures and created columns are in the sample pbix file.

 

Picture6.png

 

https://www.dropbox.com/s/5bhb72jux254dxl/primolee2.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @primolee 

Please check the below picture and the sample pbix file's link dow below.

I created both measures and columns.

All measures and created columns are in the sample pbix file.

 

Picture6.png

 

https://www.dropbox.com/s/5bhb72jux254dxl/primolee2.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hello @Jihwan_Kim ,

 

Thank you again for your help.  Greatly appreciated!

 

To further extend the question.  Because we have different weight values for different people, is it possible to have a filter visual in the report, choose a person's weight setting, then calculate the weighted spending?

 

In this case, I have 1 more column as Name, just as John and Peter, and each of them have their weight setting.  Then make a name filter in the report.

 

Thank you very much.

 

Best regards,

David

Hi, @primolee 

Thank you for your feedback.

I am not sure how to create the person's name column, but I just simply created it to show as a table visualization.

Please check the below picture and the link down below, whether it is what you are looking for.

 

Picture3.png

 

 

https://www.dropbox.com/s/5bhb72jux254dxl/primolee2.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hello @Jihwan_Kim ,

 

Thank you so much for your prompt reply.

 

This is what I meant, add a "Name" column to the weight table.  Then use filter visual to single select name.

weightcost.jpg

 

Column will not work, but measure seems to work fine.

https://drive.google.com/file/d/1BcFHRkQFESSs-T_hcYMl0XmBndZp5vVN/view?usp=sharing 

 

Thank you once again for your help!

 

Best regards,

David

 

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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