Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am trying to filter the count of submissions by year and months selected by user (slicer),
I created a measure to get the count by year but in case of months, the end user can select multiple values (Jan, feb etc)
I wrote the following formula, but it only works when selecting one month not multiple
Submissions_CurrentyearValue =
var YearValue= MAX(DimDateSubmission[Year])
var MonthValue= ALLSELECTED('DimDateSubmission'[Month])
Return
Calculate(CountA(Submisions[Submission Number]),
Filter (
All(Submisions), YEAR(Submisions[Submission Date]) = YearValue && Month( Submisions[Submission Date]) = MonthValue ) )
Is there any way to allow multiple selections on month slicer??
Solved! Go to Solution.
Hey @Manar
I think replacing the "=" with "IN" will solve your problem, so instead of
&& Month( Submisions[Submission Date]) = MonthValue
you might want to try
&& Month( Submisions[Submission Date]) IN MonthValue
Let me know if that solves your problem.
Hope this helps,
Parker
Hey @Manar
I think replacing the "=" with "IN" will solve your problem, so instead of
&& Month( Submisions[Submission Date]) = MonthValue
you might want to try
&& Month( Submisions[Submission Date]) IN MonthValue
Let me know if that solves your problem.
Hope this helps,
Parker
Hi all,
I have a similar issue, but instead I need to get the month with the MAX and MIN net sales from current year per selected Status type. The user can choose among 3 categories (individually or clicking 2 or all 3 of them). If 2 or 3 categories together are chosen, the MAX and MIN must give the respective resulting month of the combined sales from these categories. The current measure looks like this:
var Status=ALLSELECTED(Status[Status type])
return
calculate(sum(Orders[Amount]);filter((Orders);Orders[Status type] in Status ))
Unfortunately, this measure provides inside a Card the total cumulated sales of the selected categories (for combined categories or individually). By adding this measure into a Matrix, I can see the period breakdown.
However, if I replace SUM by MAX (see code below) I get always the maximum period BUT from one of the 3 categories. For instance, if the user selects the 3 categories together, the measure returns the max sales period from ONLY that category with the "highest max" among the 3 selected categories. This is wrong, because we expect to get the max sales period from the combined selected categories.
calculate(max(Orders[Amount])
Replacing SUM by MIN we get exactly the opposite result. The measure returns the min sales period from ONLY that category with the "lowest min" among the 3 selected categories, and not from the combined categories.
calculate(min(Orders[Amount])
I tried also to use SUMX, MAXX and MINX, the the result is the same.
What am I doing wrong?
Thank you very much in advance,
Gustavo
@Anonymous that worked!! thanks!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
61 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
85 | |
60 | |
45 | |
41 | |
39 |