Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
hi,
Below is imitation of database I link to Power BI.
So I need my Power BI report to ignore row with "Fixed" section name and split row's value between all other remaining sections (A, B and C) based on time. Example - row with section "A" shall get $12,500 from Fixed. Calculation: 40,000 * 5 days / (5+8+3). Row "B" would get 20,000 : 40,000 * 8 days / (5+8+3). And so on.
Is such data adjustment even possible in Power BI? I guess I need to create a new column which would take values form "Fixed" row and add to other existing rows. Can you please help me with DAX formula?
| Section | Value | Time |
| A | 20,000 | 5 |
| B | 30,000 | 8 |
| C | 15,000 | 3 |
| Fixed | 40,000 |
Solved! Go to Solution.
Value with Fixed =
var f = CALCULATE(sum('Table'[ Value ]),'Table'[Section]="Fixed")
var t = sumx(filter(all('Table'),[Section]<>"Fixed"),[Time])
var b = ADDCOLUMNS('Table',"v",f*[Time]/t)
return sumx(b,[v]+[ Value ])
Value with Fixed =
var f = CALCULATE(sum('Table'[ Value ]),'Table'[Section]="Fixed")
var t = sumx(filter(all('Table'),[Section]<>"Fixed"),[Time])
var b = ADDCOLUMNS('Table',"v",f*[Time]/t)
return sumx(b,[v]+[ Value ])
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |