The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi friends,
In another topic I had help creating a measure. Now I'm trying to create a pie chart to see the consolidated information. I want to know how many times Attention or compliance appears when I select the YEAR. Is this possible?
Ex.1:
ex.2:
Regards!
Solved! Go to Solution.
Thanks for the reply from @Kaviraj11 , please allow me to provide another insight:
Hi @msam86 ,
I couldn't open your PBIX on my end, so I created the data:
Here are the steps you can follow:
1. Enter data – create a table.
2. Create measure.
Measure=
COUNTX(
FILTER(ALL('Dados'),[Status]=MAX('Table'[Status])),[Status])
3. Result:
Note: You need to change [Status], delete the formula “MAX(Dados[MesclaANO]) -- Default to the original status if no condition matches”, or replace it with the same formula as before. data type (this formula data type is text)/blank () instead of
According to Power BI design, there can only be one data format in a column of data, and “Compliance” is a text type, MAX(Dados[MesclaANO]) is a date type.
Status =
VAR SelectedYear = SELECTEDVALUE('DataParameter'[DataParameter])
RETURN
SWITCH(
TRUE(),
YEAR(MAX(Dados[MesclaANO])) < SelectedYear, "Down",
YEAR(MAX(Dados[MesclaANO])) = SelectedYear, "Attention",
YEAR(MAX(Dados[MesclaANO])) > SelectedYear, "Compliance"
)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply from @Kaviraj11 , please allow me to provide another insight:
Hi @msam86 ,
I couldn't open your PBIX on my end, so I created the data:
Here are the steps you can follow:
1. Enter data – create a table.
2. Create measure.
Measure=
COUNTX(
FILTER(ALL('Dados'),[Status]=MAX('Table'[Status])),[Status])
3. Result:
Note: You need to change [Status], delete the formula “MAX(Dados[MesclaANO]) -- Default to the original status if no condition matches”, or replace it with the same formula as before. data type (this formula data type is text)/blank () instead of
According to Power BI design, there can only be one data format in a column of data, and “Compliance” is a text type, MAX(Dados[MesclaANO]) is a date type.
Status =
VAR SelectedYear = SELECTEDVALUE('DataParameter'[DataParameter])
RETURN
SWITCH(
TRUE(),
YEAR(MAX(Dados[MesclaANO])) < SelectedYear, "Down",
YEAR(MAX(Dados[MesclaANO])) = SelectedYear, "Attention",
YEAR(MAX(Dados[MesclaANO])) > SelectedYear, "Compliance"
)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you my friend. I understood what you did and applied it to my table.
Regards
Hi guys,
I created a pbix file to help understand what I need.
I need to count how many times the measurement words appear and are shown in a pie chart.
Regards
Download pbix:
Yes, It's possible. Drop in the Pie Chart, Put the measure created into 'Values' section & Column that contains Attention or complianc into the legend section. You will have the ability to select the label contents under Details Labels section too.
Proud to be a Super User! | |
Hi @Kaviraj11 , but there is one point that I forgot to mention: I created this measurement using a parameter:
I need this condition year after year to visualize the pie chart.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
81 | |
78 | |
43 | |
37 |
User | Count |
---|---|
157 | |
112 | |
64 | |
60 | |
54 |