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.
Good morning,
I have created a card that shows the number of vehicles that are older than 10 years.
The vehicles are divided in 3 groups: A, B and C.
I have another dashboard that shows other data of A,B and C.
When i select in the dashboard for example A, in the card it shows a 1 ( there is only 1 vehicle of group A in the data with age>10).
if i select in the dashboard group B, instead of showing a 0 ( because there is no vehicle in group B with age>10), the card shows a text message with "In blank".
I dont know if there is a way of showing 0 instead of the message.
Thank you
Solved! Go to Solution.
Hi, @Anonymous you have to create a measure and put in the formula as mentioned:
NrOfVehicles_measure=IF(ISBLANK([Number of vehicles with more than 10 years]),0,[Number of vehicles with more than 10 years])
or
NrOfVehicles_measure=COALESCE([Number of vehicles with more than 10 years],0)
and then put the measure in your card visual.
--
Hi @Anonymous ,
We can add +0 following the formula as below.
Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[age]>=10))+0
For more details, please check the pbix as attached.
Hi @Anonymous ,
We can add +0 following the formula as below.
Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[age]>=10))+0
For more details, please check the pbix as attached.
Thank you this work!!
But i have the same problem with the following field
i have defined the following card:
i defined a new messure as you told me but with YES, and a error message is shown saying that is not correct
Thank you
Hi @Anonymous, you can check the value with
IF(ISBLANK(myvalue),0,myvalue) function
or with
COALESCE(myvalue,0) function
Hope it will help you
--
@Anonymous
Create your formula with + 0
Measure = calculation(...) +0
And try
Hi @Anonymous ,
You actually have many solutions :
1/ Using a format on your data
2/ Using IF() function and ISBLANK() function to test and replace by the required value
IF(ISBLANK(Yourdata);0;YourData)
But quite sure you could find other ways...
Have a nice day
Thank you for answering.
I dont know where to put the "If is blank" form.
The way i have made the card to show how many vehicles have age>10 is by using the "Count" option and then in the "Filters" tab specifying to show only the ones that are bigger than 10
Hi, @Anonymous you have to create a measure and put in the formula as mentioned:
NrOfVehicles_measure=IF(ISBLANK([Number of vehicles with more than 10 years]),0,[Number of vehicles with more than 10 years])
or
NrOfVehicles_measure=COALESCE([Number of vehicles with more than 10 years],0)
and then put the measure in your card visual.
--
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |