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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jubrna01
Frequent Visitor

Multiply column values by a number which can be altered on the dashboard

Hello,

 

I need to multiply each value in a column by a value that can be altered. I have checked this post here


http://community.powerbi.com/t5/Desktop/Multiply-column-values-by-a-number-which-can-be-altered-on-t...

But I guess the purpose in that post was to multiply one single value by another number, not each single value in a column, because when I tried to apply the measure it told me that it can not be applied on multiple values.

Am I missing something?

Thanks in advance

2 ACCEPTED SOLUTIONS
v-yuezhe-msft
Employee
Employee

@jubrna01,

You can create a measure using similar DAX below.

Measure = MAX('Yourtable'[yourcolumn] )* MAX([alteredColumn])


Also you can take use of what if parameter in Power BI Desktop.

If you still get errors, please share sample data of your table and post your dax here.

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

In case some one have the same problem, this is the final solution

Total Adj Sales ALT 2 =
SUMX (
    'Table',
    SWITCH (
        TRUE (),
        'Table'[Adjustment] = "b", 'Table'[Sales] * what_if_parameter,
        'Table'[Adjustment] = "c", 'Table'[sales] * what_if_parameter,
        'Table'[Sales]
    )
)

 

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@jubrna01,

You can create a measure using similar DAX below.

Measure = MAX('Yourtable'[yourcolumn] )* MAX([alteredColumn])


Also you can take use of what if parameter in Power BI Desktop.

If you still get errors, please share sample data of your table and post your dax here.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

In case some one have the same problem, this is the final solution

Total Adj Sales ALT 2 =
SUMX (
    'Table',
    SWITCH (
        TRUE (),
        'Table'[Adjustment] = "b", 'Table'[Sales] * what_if_parameter,
        'Table'[Adjustment] = "c", 'Table'[sales] * what_if_parameter,
        'Table'[Sales]
    )
)

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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