Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
I have a table with dates, Variants and Measurement readings spanning 10 years. The table in a simplified form looks like this:
| Date | Variant | Measurement | Unit |
| 2/2/2011 | A | 45 | ppm |
| 2/15/2011 | B | 0.2 | g |
| 3/16/2011 | C | 21 | mg/cc |
| 10/4/2011 | A | 34 | ppm |
| 11/23/2011 | B | 0.19 | g |
| 12/13/2011 | C | 28 | mg/cc |
| 1/2/2012 | A | 32 | ppm |
| 4/5/2012 | B | 0.22 | g |
| 5/2/2012 | C | 20.2 | mg/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
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.
Then put the Varients field in "Filters" and filter out the value of "A".
Get the following result:
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.
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
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
Proud to be a Datanaut!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.