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.
Hi,
I have a column with values against a city.
So the city is broken down row wise and the the months for a fiscal year as a column. The measure brings in the values.
I have values for only one month so I require to show '-' agaist all the nulls/empty values.
I wrote the following.
Solved! Go to Solution.
This issue was resolved. The problem was there was a missing relationship.
Hi @Anonymous ,
In your secnario, please update your measure as below.
Measure =
IF (
MAX ( 'Table'[date] ) <> BLANK ()
&& ISBLANK ( SUM ( 'Table'[value] ) ),
"-",
SUM ( 'Table'[value] )
)
For more details, please check the pbix as attached.
Hi Mate,
Thanks for the reply. The DAX you provided helps keep the number of cities the same. However, the "-" shows up only on the total row across all months. The "-" doesn't display against each city nor across the months. Very strange.
I've actually written the SQL in the backend to show zero for all empty values. but the zeros are showing up only for the month with valid values.
Hi @Anonymous , can you post a sample of your data and expected results.
According to your DAX, it will display the stock values as "-" for null values.
From your description and measure, Power BI will display all the cities like this:
- cities with values -> City | SUM (Stock Value)
- cities with null values -> City | "-"
If you do not want to display the items without data, you can simply turn it off by unchecking "Show items with no data" under values as shown in the attached picture.
I tried this mate but it brings in heaps of unwanted stuff
Hi @Anonymous ,
Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
The table in the data model is showing the zeros but it's just not displaying on the front end.
This issue was resolved. The problem was there was a missing relationship.
The data is confidential, so i cannot share it.
I did try to get a trimmed screenshot and attach it, but the forum post complained and removed it automatically.
The below screenshot is using the measure you sent over. As you can see, hard coded zeros from the database are showing up only on Nov along with other values.
The below is what I actually want as the output. But as you can see, it's listing all the projects.
The DAX used for below output.
User | Count |
---|---|
119 | |
78 | |
59 | |
52 | |
48 |
User | Count |
---|---|
171 | |
117 | |
61 | |
59 | |
53 |