Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
Problem statement trying to address : I have a dataset that have people and ther age. I am trying to count the number of people based on the dynamic bin(X axis) that i have created using numeric range filter from 0 - 120 . But for some reason my measure (SumX )is not working, it is just putting all the counts into one single bucket. Please see the screenshot and measure below, Can someone please assist. Thanks!
Expected result is to show 1 in each 60 and 70 row's, but it is showing in in single bucket i.e. 60.
Thanks
**************************************
Solved! Go to Solution.
Hi @BChinya ,
Please try:
Number of subjects within =
VAR _Binsize_min =
SELECTEDVALUE ( 'Bin Start'[Bin Start] )
VAR _binsize_end =
_Binsize_min + SELECTEDVALUE ( 'Bin Size'[Bin Size] )
VAR _subnr =
CALCULATE (
COUNTROWS ( DM ),
'DM'[Age] >= _Binsize_min
&& 'DM'[Age] < _binsize_end,
ALLSELECTED ( 'DM'[Subject] )
)
RETURN
_subnr
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @BChinya ,
Please try:
Number of subjects within =
VAR _Binsize_min =
SELECTEDVALUE ( 'Bin Start'[Bin Start] )
VAR _binsize_end =
_Binsize_min + SELECTEDVALUE ( 'Bin Size'[Bin Size] )
VAR _subnr =
CALCULATE (
COUNTROWS ( DM ),
'DM'[Age] >= _Binsize_min
&& 'DM'[Age] < _binsize_end,
ALLSELECTED ( 'DM'[Subject] )
)
RETURN
_subnr
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Thank you. This works like charm!
Hi @BChinya
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
125 | |
111 | |
73 | |
65 | |
46 |