Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am having card visual for some measure values which are changing based on month slicer.
i am new in DAX
e.g Averageof%ArchivedforBaselineCircle = AVERAGE('Stage FI_CRS_DashboardInput'[PercentageArchived]) i calculated this average value and it is changing based on month selecting user from slicer.
Values are coming properly in visual when having data for that KPI no in database for that measure but how to handled if we don't have entry for any month in database and user selecte that month in slicer visuals are populating with #NA values . and i need to apply this all visual which are changing after selecting slicer.
what DAX i need to handle please help me here.
So, this is a bit tricky because a measure cannot return two different data types (number and text in this case). However, you can get around this with a CONCATENATE. Here is an example:
Measure 9 = IF(ISBLANK(COUNT(bar[b])),"NA",CONCATENATE(COUNT(bar[b]),""))
HI Thanks @Greg_Deckler
when i used measure as you suggested it is working for.
Previously i used measure for Trend is =
Trend KPI No 13 = [Baseline Month KPI NO 13]-[COM Baseline Month for KPI NO 13]
As per your suggestion for #NA i modified that as below and now using below
Trend KPI No 13 = IF(ISBLANK([Baseline Month KPI NO 13]-[COM Baseline Month for KPI NO 13]),
"#NA",CONCATENATE([Baseline Month KPI NO 13]-[COM Baseline Month for KPI NO 13],""))
it is working for me when there is not data for any month it is showing #NA value, but previosuly the same measure when i applied with table visual conditional formatting option is coming but after modifying and using with #NA above one conditional formating option is not coming. please suggested me how to on that conditional formatting with 2nd one as well which i am using with "#NA". if that option come my problem will resolve so please guide me on that.
i using this filed in table visual only and try to conditional formatting on that but that option is not coming.
Trend KPI NO 13 this field below is formula for that.
Trend KPI No 13 = IF(ISBLANK([Baseline Month KPI NO 13]-[COM Baseline Month for KPI NO 13]),
"#NA",CONCATENATE([Baseline Month KPI NO 13]-[COM Baseline Month for KPI NO 13],""))
when i draged that field in table visual condition formatting is not coming.
But when i draged below field with this below formula, conditional formating option is coming for me.
Trend KPI No 13 = [Baseline Month KPI NO 13]-[COM Baseline Month for KPI NO 13]
but i want conditional formatting option on above field. due to confidential part not able to share data or table sorry for that but how to achive that on that conditional formatting on above field.
@Anonymous,
Please share sample data of your original table, I will create the above fields in the table and test this scenario.
Regards,
Lydia
@Anonymous,
Could you please share the sample data of your table so that we can test? We also need to know which fields you use to create the table visual.
Regards,
Lydia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |