Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello
Our database holds lots of addresses with the Country as United Kingdom. I'd like to use Power BI's Conditional Formatting function to make these into blanks. We use the lists extracted via Power BI to mail people, and we simply don't want the country to appear if it's United Kingdom, but we would like the Country to show if it's e.g. Italy or Spain etc.
I've tried creating a Measure using the following criteria, but I don't think it's going to work as it's been running for 20 minutes so far!
Solved! Go to Solution.
@jonclay actually, that's the really cool thing about power query (the transform data screen), it will apply that step on all new data that comes in too 🙂
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Hi @jonclay ,
According to your description, using the "replace value" function in power query is a good choice. As long as the data source is successfully connected, the above operations will still be performed automatically after refreshing the data.
after refersh:
Or the measure like below:
M =
IF (
SELECTEDVALUE ( Sheet1[Column1] ) = "United Kingdom",
MAX ( Sheet1[Column1] ),
""
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jonclay ,
According to your description, using the "replace value" function in power query is a good choice. As long as the data source is successfully connected, the above operations will still be performed automatically after refreshing the data.
after refersh:
Or the measure like below:
M =
IF (
SELECTEDVALUE ( Sheet1[Column1] ) = "United Kingdom",
MAX ( Sheet1[Column1] ),
""
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, Henry. Both of those work perfectly!
@jonclay It may be easier to
1. go back into "Transform Data"
2. on the "address1_country" column you can right-click it
3. choose "Replace Values"
4. replace "United Kingdom" with null or a space.
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Thanks @DataZoe
The only problem with this is that the underlying data gets added to each day, so there will always be new records showing the Country of United Kingdom.
Thank you, Zoe. That works perfectly!
@jonclay actually, that's the really cool thing about power query (the transform data screen), it will apply that step on all new data that comes in too 🙂
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
@jonclay ,
You should use this on your measure
New Measure= VAR Country = SELECTEDVALUE(contact[address1_country])
RETURN IF(Max(Table[Country]) ="United Kingdom", [Measure], blank())
The country is used in grouped in visual as row/column/axis
@amitchandak
Thank you for your quick response. However, the [Measure] section towards the end of the statement is causing me a problem. Power BI is underlining it with a squiggly line and saying that Measure cannot be determined.