Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello !!!
I am pretty much new to Power BI. I am trying to build a Formula 1 visualization from this dataset:https://www.kaggle.com/datasets/rohanrao/formula-1-world-championship-1950-2020. I have created a measure to show who is the champion with the help of Chat GPT, to be honest. The measure is
Solved! Go to Solution.
Hi @Yadidya
@ToddChitt Thank you very much for your prompt reply.
I was checking the forum posts and found your post. May I ask if your problem has been solved? If not yet, I have an idea.
If the measure you provided outputs the desired result, then please try it:
Create a measure.
count champion =
var currentChampion = [champion]
RETURN
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[champion] = currentChampion
)
)
Here is the result.
I've attached a simple demo.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Yadidya
@ToddChitt Thank you very much for your prompt reply.
I was checking the forum posts and found your post. May I ask if your problem has been solved? If not yet, I have an idea.
If the measure you provided outputs the desired result, then please try it:
Create a measure.
count champion =
var currentChampion = [champion]
RETURN
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[champion] = currentChampion
)
)
Here is the result.
I've attached a simple demo.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you just take some screen shots of actual data (not the model view) of the tables involved?
Proud to be a Super User! | |
@ToddChitt my data source is from this link https://www.kaggle.com/datasets/rohanrao/formula-1-world-championship-1950-2020. The CHampion measure is Champion = CALCULATE(FIRSTNONBLANK(drivers[surname],1), TOPN(1, SUMMARIZE(results, drivers[surname], races[year], "Total_Points", [Total_Points]), [Total_Points], DESC)).
You don't need DAX for that. Simply build a COLUMN chart, add Driver Name (Champion) on the X axis and COUNT(Year) on the Y axis. Note that when you add [Year], because it is numeric, it may want to summarize it. You need to switch the aggregation from SUM to COUNT.
Proud to be a Super User! | |
@ToddChitt When attempting to add the 'Champion' measure to the X-axis of a column chart, it is not being accepted, even when dragging and dropping.
Maybe go back and ask Chat GPT what went wrong? 🙂
Can you show us an example of your source data BEFORE Chat GPT did anything to it?
Proud to be a Super User! | |
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
88 | |
85 | |
68 | |
68 | |
64 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |