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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
kkanda
Resolver II
Resolver II

Need help with filtering a table for separate charts

Hi All,

I have a table with dates, Variants and Measurement readings spanning 10 years. The table in a simplified form looks like this:

DateVariantMeasurementUnit
2/2/2011A45ppm
2/15/2011B0.2g
3/16/2011C21mg/cc
10/4/2011A34ppm
11/23/2011B0.19g
12/13/2011C28mg/cc
1/2/2012A32ppm
4/5/2012B0.22g
5/2/2012C20.2mg/cc

I have to create separate line charts for each Variant to show the Measurement value for that Variant over a period of time. I tried creating Measures with CALCULATETABLE function for each Variant but I get the message that "Measures need to be scalar values" and not many records.

Will the experts advise how I go about this task?

Thank you

Krishna

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

Hi @kkanda ,


According to your needs, you want to display the change value of different Variants in each line chart. I did the following test as a reference:

Place the date field and the Measurement field in the corresponding position of the line char visual.

v-henryk-mstf_0-1613371099911.png

Then put the Varients field in "Filters" and filter out the value of "A".

v-henryk-mstf_1-1613371174045.png

Get the following result:

v-henryk-mstf_0-1613371459461.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

 

Best Regards,
Henry

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

BA_Pete
Super User
Super User

Hi @kkanda ,

 

You should just be able to hardcode different measures for each variant, although this depends on how many variants you have, something like this:

 

_variantA =
CALCULATE(
  SUM(yourTable[Measurement]),    //could be AVERAGE(), MAX() etc.
  yourTable[Variant] = "A"
)

 

 

Alternatively, if all of your variants use the same aggregation (SUM, AVERAGE etc.) you could just use the following measure and set visual filters on the [Variant] that you want each visual to display:

 

_measurementValue = SUM(yourTable[Measurement])  //could be AVERAGE, MAX etc.

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thanks for the response. I do not need the SUM or any aggregate.. I want to plot individual Measurement readings against the Dates. I have 14 different Variants.

Hi @kkanda ,

 

You would still use a measure with SUM or another aggregator, it's just that the aggregation will get split up by date when you use it on your axis.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors