Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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:
Solved! Go to Solution.
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
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
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.
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] )
Regards,
Xiaoxin Sheng
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:
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
Hi @Anonymous
I think that you forgot to paste the table.
Sorry, here is the table:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |