Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
It's probably easiest to explain this by starting with an image first
What I'm tryin to do is have each one of these lead counts filter to the selected value of the month above them, which are currently set up in 3 separate datedim tables. Then what I'm trying to do is use those calculations to get the % change in the card visual on the far right.
My Lead Count cards are presently using variations of this measure and the output what I need:
Lead Count =
var monthtouse = SELECTEDVALUE(TableDateDim[MonthAbbrvAndYearName])
var maxdate = calculate(max(AlternateDateDim1[DateSK]),AlternateDateDim1[MonthAbbrvAndYearName] = monthtouse)
var mindate = calculate(min(AlternateDateDim1[DateSK]),AlternateDateDim1[MonthAbbrvAndYearName] = monthtouse)
var leadcount = calculate(DISTINCTCOUNT(Table[IdentifierDim]),Table[CreateDtID] >= mindate,Table[CreateDtID] <= maxdate)
return leadcount
The issue I've run into that I cannot figure out a solve for is the card for the MoM Change will not work without allowing interactions with the slicers but the second I allow both slicers to interact with the card they conflict and the card outputs (blank). Currently the measure I'm using is very simple but apparently won't work like I had hoped
Leads MoM Change =
var leadsrecent = [Lead Count]
var leadsother = [Lead Count2]
var output = divide(leadsrecent-leadsother,leadsother)
return output
Is there some creative way to get to my end that I just haven't thought of or seen before? I'm about at my wits end.
Solved! Go to Solution.
Hi @bdmichael09 ,
SELECTEDVALUES doesn’t support multiple values. So you can use VAUES function.
The lead count measure as following,
New lead count =
var monthtouse = VALUES(AlternateDateDim1[MonthAbbrvAndYearName])
var maxdate = calculate(max(AlternateDateDim1[DateSK]),AlternateDateDim1[MonthAbbrvAndYearName] in monthtouse)
var mindate = calculate(min(AlternateDateDim1[DateSK]),AlternateDateDim1[MonthAbbrvAndYearName] in monthtouse)
var leadcount = calculate(DISTINCTCOUNT(Data[Identifier]),Data[CreateDtID] >= mindate,Data[CreateDtID] <= maxdate,USERELATIONSHIP(AlternateDateDim1[DateSK],Data[CreateDtID]))
return leadcount
The reason why MoM displays blank is the interactions. Please check the interactions between slicers and card visuals.
The following is the result of our change interaction, is it what you want?
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi @bdmichael09 ,
How about the result after you follow the suggestions mentioned in my original post?
Could you please provide more details or expected result about it If it doesn't meet your requirement?
If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @bdmichael09 ,
SELECTEDVALUES doesn’t support multiple values. So you can use VAUES function.
The lead count measure as following,
New lead count =
var monthtouse = VALUES(AlternateDateDim1[MonthAbbrvAndYearName])
var maxdate = calculate(max(AlternateDateDim1[DateSK]),AlternateDateDim1[MonthAbbrvAndYearName] in monthtouse)
var mindate = calculate(min(AlternateDateDim1[DateSK]),AlternateDateDim1[MonthAbbrvAndYearName] in monthtouse)
var leadcount = calculate(DISTINCTCOUNT(Data[Identifier]),Data[CreateDtID] >= mindate,Data[CreateDtID] <= maxdate,USERELATIONSHIP(AlternateDateDim1[DateSK],Data[CreateDtID]))
return leadcount
The reason why MoM displays blank is the interactions. Please check the interactions between slicers and card visuals.
The following is the result of our change interaction, is it what you want?
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi,
Why do you need 4 drop downs? Why 4 date tables? Try this:
Lead count =
DISTINCTCOUNT(Table[IdentifierDim])
Lead count in previous month
calculate([lead count],previousmonth(calendar[date]))
Lead count in previous month
calculate([lead count],sameperiodlastyear(calendar[date]))
Growth in lead count over previous month (%)
divide(([lead count]-[lead count in previous month]),[lead count in previous month])
Growth in lead count over same period last year (%)
divide(([lead count]-[lead count in same period last year]),[lead count in same period last year])
@Ashish_Mathur I have a calendar table with every possible calendar field you could want, trust me, and I already had a relationship tied between the data table and the date table. I also initially only had the 1 date table but I tried creating the additional ones as a hail mary to solve the problem but it's not the date tables causing my problem.
I've got the page set up to look like its 'This month' compared to 'last month' but I would like to be able to compare months at will, hence the use of the selectedvalue() function with the months in the slicers. Without the desire to be able to compare months at will, I probably would have done exactly what you suggested. If I absolutely have to hard code then I'll hard code, but I would prefer a complex or creative solution if it enables flexibility in the end.
Hi,
In that case, you will have to create inactive relationships between your base dataset and other calendar tables and then use the USERELATIONSHIP() function to compare months of your choice.
@Ashish_Mathur I had tried both active and inactive relationships with those tables. I just tried including USERELATIONSHIP() and that also doesn't seem to be getting things to work as I would like them to. Either something is just eluding me or that also is not a solution to the problem. I've uploaded a trimmed down version of my .pbix file that should include the necessary tables, fields, and measures in case that is helpful.
https://www.dropbox.com/s/jn0wfd1qokk5mfu/CSC%20Dash2.pbix?dl=0
Hi,
In the image, you can see that the cards where the filter criteria is August 2020 are working fine. Create the AlternateDateDim tables the same as the DateDim table and create the same relationship that i have. Then write three measures (the way i have create the "Measure" measure).
Hope this helps.
You may download the PBI file from here.
Hope this helps.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
96 | |
69 | |
45 | |
39 | |
30 |
User | Count |
---|---|
155 | |
96 | |
60 | |
42 | |
41 |