March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am looking to build a similar view in powerbi, but i am unable to add the measures at the end of the matrix chart. The % good and % not good, are custom measures at the end of matrix chart.
Can someone please guide if this kind of view is achievable in Powerbi. Such views are easily achieveble in excel.
Solved! Go to Solution.
Hi,@snehawankhede
I am glad to help you.
Based on your description, you can refer to my test below
You will need to create a “Head” table to assist the original table.
Here's my test data
M_result =
SWITCH(TRUE(),
SELECTEDVALUE(Header[category])="Material",
SWITCH(TRUE(),
SELECTEDVALUE(Header[name])="Wood",[M_1],
SELECTEDVALUE(Header[name])="Particle Board",[M_1],
SELECTEDVALUE(Header[name])="Iron",[M_1]
),
SELECTEDVALUE(Header[category])="Others",
SWITCH(TRUE(),
SELECTEDVALUE(Header[name])="%Good",[M_%Good],
SELECTEDVALUE(Header[name])="%Not Good",[M_%Not_Good]
)
)
M_1 =
CALCULATE(MAX('Table'[Opinion]),'Table'[Type]=SELECTEDVALUE(Header[name]))
M_%Good =
VAR goodNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])&&'Table'[Opinion]="Good"))
VAR goodNum02=
IF(goodNum=BLANK(),0,goodNum)
VAR allNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])))
RETURN
DIVIDE(goodNum02,allNum,0)
M_%Not_Good =
VAR notgoodNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])&&'Table'[Opinion]="Not Good"))
VAR notgoodNum02=
IF(notgoodNum=BLANK(),0,notgoodNum)
VAR allNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])))
RETURN
DIVIDE(notgoodNum02,allNum,0)
I uploaded the test file, you can refer to it.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,@snehawankhede
I am glad to help you.
Based on your description, you can refer to my test below
You will need to create a “Head” table to assist the original table.
Here's my test data
M_result =
SWITCH(TRUE(),
SELECTEDVALUE(Header[category])="Material",
SWITCH(TRUE(),
SELECTEDVALUE(Header[name])="Wood",[M_1],
SELECTEDVALUE(Header[name])="Particle Board",[M_1],
SELECTEDVALUE(Header[name])="Iron",[M_1]
),
SELECTEDVALUE(Header[category])="Others",
SWITCH(TRUE(),
SELECTEDVALUE(Header[name])="%Good",[M_%Good],
SELECTEDVALUE(Header[name])="%Not Good",[M_%Not_Good]
)
)
M_1 =
CALCULATE(MAX('Table'[Opinion]),'Table'[Type]=SELECTEDVALUE(Header[name]))
M_%Good =
VAR goodNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])&&'Table'[Opinion]="Good"))
VAR goodNum02=
IF(goodNum=BLANK(),0,goodNum)
VAR allNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])))
RETURN
DIVIDE(goodNum02,allNum,0)
M_%Not_Good =
VAR notgoodNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])&&'Table'[Opinion]="Not Good"))
VAR notgoodNum02=
IF(notgoodNum=BLANK(),0,notgoodNum)
VAR allNum=CALCULATE(COUNT('Table'[Opinion]),FILTER(ALL('Table'),'Table'[Sub-Category]=MAX('Table'[Sub-Category])))
RETURN
DIVIDE(notgoodNum02,allNum,0)
I uploaded the test file, you can refer to it.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
90 | |
90 | |
66 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |