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...
quantumudit
Super User
2 years agoHi santoshyadav
You can create a DAX measure like this and use it in your report table visual to get the desired result:
Fraction Value =
VAR _secFraction =
CALCULATE ( SUM ( Liquid_tbl[fraction] ), Liquid_tbl[method] = "sec" )
VAR _intFraction =
CALCULATE ( SUM ( Liquid_tbl[fraction] ), Liquid_tbl[method] = "Int" )
RETURN
IF ( ISBLANK ( _secFraction ), _intFraction, _secFraction )
You can also create a small measure "Total Fraction" as follows, and use it instead of SUM ( Liquid_tbl[fraction] )
Total Fraction = SUM ( Liquid_tbl[fraction] )
Here is the screenshot of the solution:
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree