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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
tcboutte
Regular Visitor

DAX - Multiply by Explicit Row Values

Seems like a simple thing, but am looking for some help! I need to return a value in the "GC Scenario" column equal to the value of column three (94,340.75) times the percentage ("value" - second screenshot) from another table.

 

The ".25" can vary month to month and all our efforts thus far have calculated the entire column. What's the best expression to capture the single row?

 

Visual:

2021-02-26_10-38-39.png

 

Table:

PBIDesktop_2021-02-26_10-41-18.png

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

Hi, @tcboutte 

You can try a Measure like the following.

 

GC Scenario =

VAR charges_sum =

    CALCULATE ( SUM ( Financial[Charges] ), DISTINCT ( Financial[Person] ) )

VAR val =

    CALCULATE (

        ROUNDUP ( MAX(Percentage[Value]) , 2 ),

        FILTER ( Percentage, Percentage[Date] = MAX ( Percentage[Date] ) ),

        TREATAS ( VALUES ( Financial[Person] ), Percentage[Person] )

    )

RETURN

    charges_sum * val

 

Here is the pbix.

 

Best Regards,

Caiyun Zheng

 

Is that the answer you're looking for? 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

8 REPLIES 8
v-cazheng-msft
Community Support
Community Support

Hi, @tcboutte 

You can try a Measure like the following.

 

GC Scenario =

VAR charges_sum =

    CALCULATE ( SUM ( Financial[Charges] ), DISTINCT ( Financial[Person] ) )

VAR val =

    CALCULATE (

        ROUNDUP ( MAX(Percentage[Value]) , 2 ),

        FILTER ( Percentage, Percentage[Date] = MAX ( Percentage[Date] ) ),

        TREATAS ( VALUES ( Financial[Person] ), Percentage[Person] )

    )

RETURN

    charges_sum * val

 

Here is the pbix.

 

Best Regards,

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

That did the trick for us, thank you!!

PaulDBrown
Community Champion
Community Champion

@tcboutte 

What determines which row is to be used in both tables in the calculation?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






The person's name, Chen Dean, in this case. Basically, this is to calculate the value of their revenue generation by using that variable percentage rate. We also want to keep the value accurate by month so that the historical records calculate correctly, even if the percentage changes over time. 

@tcboutte 

How is your model set up? are the tables linked in a relationship? how are you going to show the result? a page with slicers for person's name and month? or do you only want to show the latest month's result? Is the revenue linked to a month?

Probably best if you provide a depiction of what you actually want to show..





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thank you Paul. The tables are linked by Name and Date. Also, the visual will show a "Top N" result and the only sliver will be to select a Month. 

 

Here's an Excel mock-up:

EXCEL_2021-02-26_11-34-31.png

@tcboutte 

 

Thank you for that! can you please share the sample data as a file by uploading it to a cloud service (Onedrive, Google Drive, Dropbox...) and sharing from there?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks again, Paul. Here's the sample with everything pointing to a C:\PBI destination. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.