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
eriweste
Helper I
Helper I

SUM number of rows based on filter interval and values from other table

Problem

Visualize the amount of compensations that should be payed to customers based on there consumption in specific months

 

Compensation is based on intervals and are stored in separate table "MasterIntervals"

Ex:

eriweste_1-1642853983712.png

 

 

Consumption, customer and dates are stored in "ReadingTable"

 

eriweste_0-1642853828785.png

 

Based on the interval the customers consumption is related to, thay are entitled to compensation

 

We need to visualize and SUM the total amount of compensation for each "interval"

 

Ex: Based on the Month (filter) "December", 3870 customers (one per row) are in the interval "100"

= 3870 * 100

 

ANy ideas ?

 

Br

erik

 

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

Hi, @eriweste 

 

You need to calculate the number of rows then multiply by the corresponding compensation.

Like this:

NUMBER =
CALCULATE (
    DISTINCTCOUNT ( 'ReadingTable'[InstNum] ),
    'ReadingTable'[Month] = SELECTEDVALUE ( 'ReadingTable'[Month] )
)
Total =
[NUMBER] * SELECTEDVALUE ( 'MasterIntervals'[Compensation] )

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

View solution in original post

1 REPLY 1
v-janeyg-msft
Community Support
Community Support

Hi, @eriweste 

 

You need to calculate the number of rows then multiply by the corresponding compensation.

Like this:

NUMBER =
CALCULATE (
    DISTINCTCOUNT ( 'ReadingTable'[InstNum] ),
    'ReadingTable'[Month] = SELECTEDVALUE ( 'ReadingTable'[Month] )
)
Total =
[NUMBER] * SELECTEDVALUE ( 'MasterIntervals'[Compensation] )

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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