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.
Dear Folks,
I have a below use case:
I summarized the data based on Type as below from my detailed data.
Now my requirement is to add new calculated rows as per the formula.
CALC1=Revenue + Expense |
CALC2=CALC1+DEP |
NET CALC=CALC2+INTERNET_EXP |
Kindly note, I want to add calculated rows in the same Matrix view or any other view if possible, and the data shown above is summarized.
How can we do this in power bi?
Any help would be appreciated.
Thanks
Sonu
Solved! Go to Solution.
I'm afraid that I don't have an Idea over here as we don't have an option to choose Particular Values to make Subtotals.
Please try the same with creating another static table use the columns over here and check if that works.
If you like my solution, please accept it and leave a like.
Regards,
Manikumar
Proud to be a Super User!
Hi,
Create a table with the column names whic is TYPE in you case.
Create measures for value 1 &2 and the calumated masures.
Use
VALUE1 = SWITHC(TRUE(),SELECTEDVALUE(table[Type])="REVENUE", [Value1 Revenue Measure],
SELECTEDVALUE(table[Type])="EXPENSE", [Value1 ExpenseMeasure],
.............................
Create the second VALUE2 measure with the same DAX.
On Matrix use the column as TYPE from the static table that created and in values place VALUE1 and VALUE2 measures.
Regards,
Manikumar
Proud to be a Super User!
Dear Mani,
Thanks for the reply.
How would it get the CALC1, CALC2, NET_CALC as a row value in Column Type, As these are not available in Type column.
CALC1 | 382985 | 620240 |
CALC2 | 228382 | 460596 |
Net Calc | 228187 | 460596 |
Hi,
Create a static table from Home>Create Table
Create measures for EXPENSE Type for VALUE1 and VALUE2 and the same for Revenue,CValc1 and 2.....
In Case VALUE and VALUE2 are from table as columns on Matrix you don't need to calculate two measures for each type.
Then use the belwo measure to Switch the values according to the TYPE
VALUE1 = SWITHC(TRUE(),SELECTEDVALUE(table[Column1])="REVENUE", [Value1 Revenue Measure],
SELECTEDVALUE(table[Type])="EXPENSE", [Value1 ExpenseMeasure],
.............................
and for VALUE2 the same as above.
Refer the below link to use SWICTH and TRUE
https://radacad.com/write-conditional-statement-using-switch-in-dax-and-power-bi
Regards,
Manikumar
Proud to be a Super User!
Thanks Mani,
It works.
Now, What if I need these values( CALC1, CALC2, NET_CALC, and numeric values ) as a subtotal.
I'm afraid that I don't have an Idea over here as we don't have an option to choose Particular Values to make Subtotals.
Please try the same with creating another static table use the columns over here and check if that works.
If you like my solution, please accept it and leave a like.
Regards,
Manikumar
Proud to be a Super User!
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 |