Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi. I have the total2024 measured filtered by using HASONEVALUE and returning blank if it does. This has left 4 weeks in th visual, but the total is wrong. I could just turn it off, but it's something I'd really like to understand if poss. Would really appreciate any advice
Hi @dannyboy123 ,
The question on this is that you are using the IF statement and HASONEVALUE this means that at the week level you only have one week so it picks up the correct value however when you look at the total level you have more than one week because the context changes so instead of doing the SUMX with the filtering it only applies the first calculation and sums all of the values for all the weeks.
Looking at your code it's seems to be that something is not quite right also because your if statment is SELECTEDVALUE(Data[Year]) you are no doing any comparision or anything else you are just getting the value for the YEAR what is that you want to achieve?
This measure may be changed to get the correct SUM at the total level but I'm not understanding the example and the code.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI have data for some of 2024 weeks and some of 2025 weeks, with a crossover of the two since week 37
If I don't check the code using hasonevalue, I end up with a lot of empty cells for either one year or the other. I only want to display those where there is a comparison to be made
Hi @dannyboy123 ,
I have tried to do a mockup but the measures are not working has you show it on the images.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi. I have data for part of last year and part of this year. I only want to display rows where there is data for both. Hasonevalue seems to support this, because I can return blank if there are two years being filtered. Otherwise, Id have two columns, both with largely empty values in one of them. The only weeks I have data for both are weeks 37-40, so they are the only ones I want to display
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |