Forum Discussion
santoshyadav
2 years agoNew Member
Power bi dax
I have two tables portfolio_dim and liquidity_fact which are joined with Id in model. Liquid table contains column like PortID, liquid_method, fraction, liquid_type. There are two types of liquid_me...
Wilson_
Memorable Member
2 years agoHi santoshyadav,
Try something like this as a measure:
Fraction (sum) =
VAR SecValue =
MAXX (
FILTER (
liquidity_fact,
liquidity_fact[method] = "sec"
),
liquidity_fact[fraction]
)
VAR Result = COALESCE ( SecValue, MIN ( liquidity_fact ) )
RETURN Result
I am assuming one ID has at most one sec row and one int row.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.