Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi there,
I have a query on a measure that someone requested from me.
I've been asked to create a measure to get initial exports of Premium Red and Pinot Grigio in terms of volume for the first 12 months versus the volume of depletions out.
The sample file I have attached below is the data I was provided with by the user with just a small few tweaks of the data from me due to confidentiality.
Can anyone help me with creating this measure? I tried a measure and it doesn't seem to have worked. It could be that I'm not using the correct fields. Measure is below also.
Solved! Go to Solution.
Thanks for the reply from @amitchandak , please allow me to provide another insight:
Hi @gbarr12345 ,
I can't open the link you posted containing the example file, and when you say that the measure didn't work, do you mean that the result of the measure didn't contain the value Export Sales Data[Description] = “Premium Red Blend”?
Because I noticed that in your formula there is a space at the end of “Premium Red Blend ”, but there is no space in “Pinot Grigio”.
You might consider using the following dax:
Premium Red & Pinot Grigio Initial Exports =
var StartDate=CALCULATE(MIN('Export Sales Data'[Date]),ALL('Export Sales Data'))
var EndDate=EDATE(StartDate,12)
return
CALCULATE(
SUM( 'Export Sales Data'[Avg 9LE]),
FILTER('Export Sales Data',
'Export Sales Data'[Description] IN {"Premium Red Blend", "Pinot Grigio" }&&
'Export Sales Data'[Date]>= StartDate&&
'Export Sales Data'[Date]< EndDate
))
“What's the best way to put this into a graph in Power BI?” are you referring to which visual to use to display, you can follow your needs:
If you're just showing the value of the measure alone, you can use the Card visual.
If you want to show the data of the whole table succinctly, you can use table visual.
If you want to display the data in groups, you can use the Clustered column chart.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply from @amitchandak , please allow me to provide another insight:
Hi @gbarr12345 ,
I can't open the link you posted containing the example file, and when you say that the measure didn't work, do you mean that the result of the measure didn't contain the value Export Sales Data[Description] = “Premium Red Blend”?
Because I noticed that in your formula there is a space at the end of “Premium Red Blend ”, but there is no space in “Pinot Grigio”.
You might consider using the following dax:
Premium Red & Pinot Grigio Initial Exports =
var StartDate=CALCULATE(MIN('Export Sales Data'[Date]),ALL('Export Sales Data'))
var EndDate=EDATE(StartDate,12)
return
CALCULATE(
SUM( 'Export Sales Data'[Avg 9LE]),
FILTER('Export Sales Data',
'Export Sales Data'[Description] IN {"Premium Red Blend", "Pinot Grigio" }&&
'Export Sales Data'[Date]>= StartDate&&
'Export Sales Data'[Date]< EndDate
))
“What's the best way to put this into a graph in Power BI?” are you referring to which visual to use to display, you can follow your needs:
If you're just showing the value of the measure alone, you can use the Card visual.
If you want to show the data of the whole table succinctly, you can use table visual.
If you want to display the data in groups, you can use the Clustered column chart.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Liu,
That's great, thank you for your assistance.
I'm all sorted now thank you.
Kind Regards,
Greg
@gbarr12345 , I all such cases use date table joined with the date of your table. Date table should be used in slicer, measure and visual
M1=
Hi Amit,
Thanks for that. What's the best way to put this into a graph in Power BI?
Also do the measures above do what I'm looking for in my above query?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |