Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I am using this dax
Hi all,Thanks for your quick response, I'll add more.
Hi @ShahidYumeen ,
Regarding your question, the card has no filter context by default. So the judgment of your DAX in this part is always false.
ISFILTERED('public device_data_daily'[date])
Put '[date]' here to filter. If you still have questions, please further explain your needs and provide simple data.
Best wishes,
Zhou Wenbin
If you are including the date in the other visuals that would explain why it is behaving differently. When the date is in a table / matrix row, or on a chart axis, that applies a filter so ISFILTERED would return true.
Hi @ShahidYumeen ,
This is dependent of the filter context that is being applied. How is the Date column being used on the other visuals do you have that column on the visuals or are you using a slicer or the filter pnae to get the values?
The card visualizations only have a single value so if you do not have the Data has part of your context (slicer or filter) then the calculation is based on the overall value of the date son this will always return 1 and the value is correct. The same thing can happened for your pie chart that you are not using the date has part of the context of the visual.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsYeah that is the case i am not using date field directly in these visuals but i want this calc to work because when i pick a date from a slicer these visuals also get filtered so how could i make this calc applicale to these visuals too having date field not directly in them?
Try to replace the IF by a countrows:
CALCULATE(COUNTROWS('public device_data_daily'[),
ISFILTERED('public device_data_daily'[date]) && NOT(ISBLANK(MIN('public device_data_daily'[date]))),
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |