Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi @ashwinil,
I'd like to suggest you enter to query editor to do unpivot column function on your fields to transform these value filed to attribute and value, then create a matrix visual with measure to achieve your requirement.('for P&L' to row, 'attribute' to column)
Sample formula:
Measure = VAR _expense = CALCULATE ( SUM ( Table[Value] ), FILTER ( ALLSELECTED ( Table ), Table[Attribute] = "Salary" ), VALUES ( Table[For P&L] ) ) - CALCULATE ( SUM ( Table[Value] ), FILTER ( ALLSELECTED ( Table ), Table[Attribute] = "Travel" ), VALUES ( Table[For P&L] ) ) RETURN IF ( SELECTEDVALUE ( Table[For P&L] ) = "Expense", _expense, IF ( SELECTEDVALUE ( Table[For P&L] ) = "Gross Margin", CALCULATE ( SUM ( Table[Value] ), ALLSELECTED ( Table ), VALUES ( Table[Attribute] ) ) - _expense, CALCULATE ( SUM ( Table[Value] ), ALLSELECTED ( Table ), VALUES ( Table[Attribute] ), VALUES ( Table[For P&L] ) ) ) )
BTW, I have found any expense records in your table, did it real existed in your table? If not, you need to create a custom P&L table with related values, then use that value for calculate.
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |