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
Anonymous
Not applicable

Calculate each row with different value entered manually

Hello,

 

Is it possible in PowerBI to make same caluclation with manually entered values for each row in the table.

For example I made this table in excel:

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

Did these slicers are designed with same datasource table fields? If this is a case, current power bi not able to extract different selection from the same datasource slicer. You need to duplicate tables with those fields use different table fields in slicers.

BTW, power bi not able to create dynamic calculate column/table based on filter/slicer, please use measure formal instead.

Reference link and sample formula:

What if Parameter for single row 

Measure =
MAX ( T1[Value] )
    * SWITCH (
        SELECTEDVALUE ( 'T1'[Key] ),
        1, SELECTEDVALUE ( S1[Value], SUM ( S1[Value] ) ),
        2, SELECTEDVALUE ( S2[Value], SUM ( S2[Value] ) ),
        3, SELECTEDVALUE ( S3[Value], SUM ( S3[Value] ) ),
        4, SELECTEDVALUE ( S4[Value], SUM ( S4[Value] ) ),
        5, SELECTEDVALUE ( S5[Value], SUM ( S5[Value] ) ),
        6, SELECTEDVALUE ( S6[Value], SUM ( S6[Value] ) ),
        BLANK ()
    )

Notice: S1~ S6 are tables with fields that use on slicer.

Regards,

Xiaoxin Sheng

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous,

In power bi, you can't do edit on row contents as excel.
I'd like to suggest you add a measure, it can interact and calculate with current row contents and its results will be affected by filters. (you can use it to calculate in dax formula with current row and what if parameters)

Create and use what-if parameters to visualize variables in Power BI Desktop 

Regards,

Xiaoxin Sheng

 

Anonymous
Not applicable

With What If parameter I can calculate all rows in the table with the same value. 

What I need is to calculate each row with different value.

 

I want to make a calculator in PowerBI where for each row the user will put different value, based on this value PowerBI should calculate just this row.

 

Anonymous
Not applicable

HI @Anonymous,

Any index fields existed in your table? If this is a case, you can write a calculated column with a variable table to stored index and correspond rate to use defined value to calculate with current row content:

DC =
VAR dict =
    DATATABLE (
        "id", INTEGER,
        "rate", DOUBLE,
        {
            { 1, 0.1 },
            { 2, 0.2 },
            { 3, 0.3 },
            { 4, 0.4 },
            { 5, 0.5 },
            { 6, 0.6 }
        }
    )
RETURN
    T1[value]
        * MAXX ( FILTER ( dict, [id] = T1[key] ), [rate] )

11.png

Regards,

Xiaoxin Sheng

 

Anonymous
Not applicable

Hello @Anonymous  Any update after my explanation? Thanks!

Anonymous
Not applicable

I can put index, this is not a problem, but how to enter the values manually?

I want to be able to enter them for each indivisual row in slicer or something else and PowerBI to calculate based on this value.

Imagine that i have rows with products and i want in Report or Data view to be able to manupiolate the data baes on calues that i enter manually directly in the report - slicer or any other possible way

 

I made an example pbix with your data and calculated column and one example of what I really need.:

LINK TO PBIX (I used Microsoft Power BI Desktop (Optimized for Power BI Report Server - September 2019)

If you cannot open it here is print screen:

Screenshot_67.png

Anonymous
Not applicable

Hi @Anonymous,

Did these slicers are designed with same datasource table fields? If this is a case, current power bi not able to extract different selection from the same datasource slicer. You need to duplicate tables with those fields use different table fields in slicers.

BTW, power bi not able to create dynamic calculate column/table based on filter/slicer, please use measure formal instead.

Reference link and sample formula:

What if Parameter for single row 

Measure =
MAX ( T1[Value] )
    * SWITCH (
        SELECTEDVALUE ( 'T1'[Key] ),
        1, SELECTEDVALUE ( S1[Value], SUM ( S1[Value] ) ),
        2, SELECTEDVALUE ( S2[Value], SUM ( S2[Value] ) ),
        3, SELECTEDVALUE ( S3[Value], SUM ( S3[Value] ) ),
        4, SELECTEDVALUE ( S4[Value], SUM ( S4[Value] ) ),
        5, SELECTEDVALUE ( S5[Value], SUM ( S5[Value] ) ),
        6, SELECTEDVALUE ( S6[Value], SUM ( S6[Value] ) ),
        BLANK ()
    )

Notice: S1~ S6 are tables with fields that use on slicer.

Regards,

Xiaoxin Sheng

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

I think that you forgot to paste the table.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

 

Anonymous
Not applicable

Sorry, here is the table:

ex.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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