Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
beingEniola
Regular Visitor

Measure returning wrong result

Please, I'm working on this data to measure the impact of hosting paralympics on the host countries. But the measure I created to calculate the medals won before and after hosting are not returning correct results. The grand total in both prehosting and posthosting columns add up to the total medal won. While the prehosting is < hostYear the posthosting is > host year. What could be the problem?Screenshot 2024-09-19 150104.png

2 REPLIES 2
Anonymous
Not applicable

Hi @beingEniola ,

 

When I reviewed posts and I found that this post didn't seem to be solved yet.

If possible, please provide some dummy data and expected result, thanks.

It would be better that you provide us with more details about this issue.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

HotChilli
Community Champion
Community Champion

I don't fully understand the description, however, the measure is not going to return the number you want because the variable 'totalmedal' is being passed in first. Once a variable is assigned it doesn't change value.

I think you want to use the SUM(......) in the calculate line instead of the variable.

--

That might get you what you want or not (but it will be better than the existing)

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors