Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Solved! Go to Solution.
Unfortunately I wasn't able to get the HASONEFILTER function to work for me. I ended up using the IF(COUNTROWS(values functions along with a Sumx function.
Hi @PhilipTreacy ,
Thank you for the quick response.
Hi @U156531 ,
I have something to add. I have created a simple sample, please refer to.
The [T&M] is a measure.
Measure = var _a = [T&M]
var _b = SUMMARIZE('Product','Product'[Product],"aaa",[T&M])
return
IF(HASONEFILTER('Product'[Product]),_a,SUMX(_b,[aaa]))
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Unfortunately I wasn't able to get the HASONEFILTER function to work for me. I ended up using the IF(COUNTROWS(values functions along with a Sumx function.
Hi @U156531
Have you checked official documentation? HASONEFILTER function (DAX) - DAX | Microsoft Learn
This problem is hard to answer because you haven't provided any data and you state the column total is incorrect based on row values. But not shown what is actually benig calculated.
Please provide sample data and show us what you think is wrong and what you want as a desired result.
I created some sample data. The measure HOF is checking if one filter is applied. As you can see there are no filters.
HOF = IF(HASONEFILTER('DataTable'[Value]),1)
If I use the slicer to show only values = 3
You'll see that HOF now returns 1 even for the Total row.
Note that my Measure is your measure code
Measure = SUM('DataTable'[Value]) * COUNTA('DataTable'[Value])
So for the Total row is is calcuating 9 * 3 = 27.
What exactly are you expecting in your data?
Regards
Phil
Proud to be a Super User!
Phil, I'm tryimg to get value of the Mesaure in the Total row to equal the addition of the values in the rows. In you example above it should be 3 + 3 + 3 = 9.
Hi @U156531
That's what the Sum of Value column does, without needing to create a new measure?
Regards
Phil
Proud to be a Super User!
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
70 | |
52 | |
48 |
User | Count |
---|---|
45 | |
38 | |
33 | |
31 | |
28 |