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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jasonbakersd
Helper I
Helper I

dynamic bins

 

I'm having problems with creating dynamic bins based on Medical Paid amounts.

 

In this snapshot, I want the values in the chart on the right to reflect the Range in the table on the left.

What seems to be happening is that the chart is ignoring a date range slicer.   Range and Medical paid in the table are correct.

However the chart looks to be using the total value (Medical Filter).

 

The chart on the left should reflect the Range and Medical Paid based on the Reporting Date Filter.

The chart values should be 24 <25K, 1 25<50K, 0 50 < 76K, and 2 for  100K

 

This is critical to solve as we have a lot of custom bins we want to use.cbins.png

 

Here are the DAX measures 

 

MedicalPaid = CALCULATE(SUM(vMedicalClaims[AmountPaid]),DATESBETWEEN(vMedicalClaims[ReportingPaidDate],[ReportPeriodStart],ReportingDate[ReportingPeriodEnd] ))

 

Range = var temp=calculate(vMedicalClaims[MedicalPaid]) return
if(temp<25000," <25K",if(AND(temp>=25000,temp< 50000)," 25 to <50K",if(AND(temp>=50000,temp<75000)," 50 to <75K",if(AND(temp>=75000,temp<100000)," 75 to <100"," 100K"))))

 

Range of Paid = vMember[Range]   --- This is a calculated column so I can use in the chart.

 

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @jasonbakersd,

 

Current power bi not support to create a dynamic calculate column/table based on slicer, you need to use measure to instead.

Calculated Column/Table Change Dynamically According to Slicer Selection in the Report.

 

BTW, current measure not support to use as legend field.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks Xiaoxin it's good to know that the column is not able to support dynamic values.  I do need a solution to solve the binning/chart rendering; perhaps creating a table in DAX is the way to go.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.