March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am currently completely stumped on this problem I am having and am not sure if this is possible within power bi but I am trying to filter my visualization by one slicers single date value, and by entity id, test name and test type then calculate a current count by summing the count column based off of those filters. Then I would like to perform another calculation where I sum the count column again but this count would be based on a different selected single-day date value. This second count value would be capturing the selected previous period's count.
Solved! Go to Solution.
Hi @helanan ,
Yes, that's possible to do with Power BI. You need the following:
Some might recommend you to create an inactive relationship in the data model instead of disconnected table and use filter functions USERELATIONSHIP or CROSSFILTER. These solutions would be equally valid as long as they are complete and include two date tables. The reason I did not choose them is because they are most beneficial if you have two table, e.g. date and ledger, and two relationships between them, because then using USERELATIONSHIP would implicitly turn off the active relationship. Since we need two date tables because we want to feed two independant (not hierarchical) date slicers we need to turn off the relationship between the first date table and the ledger table explicitly in the measure code anyway.
BR
Martin
Thank you so much @Martin_D this was a HUGE help and worked the only issue I am running into now is that I cant get it to filter by the minimum selected start date. I am trying to make the second date slicer filter by a single day value by using the after filter in the date picker but cannot figure out how to then get this to be filtered down to only 1 selected days worth of data. Im not sure if you know the answer to that as well, thank you again!
The only options for a true single select date slicer are dropdown, verticle list, or tile slicer format. As a workaround with data picker you could choose the on or before setting and select only the maximum selected date in the measure like:
DifferentSelectedDateMeasureReferencingSelectedPeriodCount =
VAR _SelectedSecondDate = MAX ( 'Disconnected Date Table'[Date Key] )
... // continue with code as before, only change TREATAS line to
TREATAS ( { _SelectedSecondDate }, 'Test Ledger'[Date Key] )
...
Hi @helanan ,
Yes, that's possible to do with Power BI. You need the following:
Some might recommend you to create an inactive relationship in the data model instead of disconnected table and use filter functions USERELATIONSHIP or CROSSFILTER. These solutions would be equally valid as long as they are complete and include two date tables. The reason I did not choose them is because they are most beneficial if you have two table, e.g. date and ledger, and two relationships between them, because then using USERELATIONSHIP would implicitly turn off the active relationship. Since we need two date tables because we want to feed two independant (not hierarchical) date slicers we need to turn off the relationship between the first date table and the ledger table explicitly in the measure code anyway.
BR
Martin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
18 | |
16 | |
13 |