Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
So I have the following simple measure.
Msr Fg = CALCULATE(
COUNTROWS(FctTable),
FctTable[TypeOfIncident] = "xxx"
)
This measure is visualised in a Column Chart, with on the X-axis the month-year from the Datetable.
This works fine.
Now, how can I divide these Monthly values in the Chart by a value from another table depending on the monthyear?
I've created a relationship between Monthyear from datetable and monthyear from this AB-table.
MonthYear A B
| Nov-21 | 20000 | 23000 |
| Dec-21 | 21000 | 24000 |
| Jan-22 | 22000 | 25000 |
| Feb-22 | 20000 | 23000 |
| Mar-22 | 21000 | 24000 |
| Apr-22 | 22000 | 25000 |
| May-22 | 19000 | 18000 |
Help is much appreciated 😄
Solved! Go to Solution.
Yes, I would expect it to be filtered by putting Month Year in the X axis.
You could try
Msr Fg2 =
var AValue = LOOKUPVALUE( 'AB Table'[A], 'AB Table'[Month year], SELECTEDVALUE('Date'[Month year]))
return DIVIDE( [Msr Fg], AValue)
Works like a charm, Thank you!
As the date table is filtering the AB table you can use SELECTEDVALUE
New measure = DIVIDE( [Msr Fg], SELECTEDVALUE('AB Table'[A]))
This produces a blank Chart:
Msr Fg2 =
DIVIDE(
[Msr Fg],
SELECTEDVALUE('ABtable'[A])
)SelectedValue: Returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.
When I try this:
Msr Fg2 =
DIVIDE(
[Msr Fg],
SELECTEDVALUE('ABtable'[A],10)
)Divides all values by 10. So not filtered to one distinct value I guess.
When you say: "As the date table is filtering the AB table you can use SELECTEDVALUE".
You mean it's filtered in the visual by putting Monthyear in the X-axis?
Yes, I would expect it to be filtered by putting Month Year in the X axis.
You could try
Msr Fg2 =
var AValue = LOOKUPVALUE( 'AB Table'[A], 'AB Table'[Month year], SELECTEDVALUE('Date'[Month year]))
return DIVIDE( [Msr Fg], AValue)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 124 | |
| 105 | |
| 44 | |
| 32 | |
| 24 |