Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
Please help below function is getting error,
Please help me.
Solved! Go to Solution.
You'll get this error if the result-if-true and the result-if-false arguments of IF return different data types, for example, text when true and a number when false.
If you want to return text in the case of a blank, then you need to also return text when it's not blank too. You could use FORMAT there as well. For example,
Partition-1 =
VAR Partition = TOKENFLEX_COUNT[Partition_1]
RETURN
IF (
ISBLANK ( Partition ),
FORMAT ( TODAY () - 1, "yyyymmdd" ),
FORMAT ( Partition, "Standard" )
)
Hi @Fahad5,
Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
You'll get this error if the result-if-true and the result-if-false arguments of IF return different data types, for example, text when true and a number when false.
If you want to return text in the case of a blank, then you need to also return text when it's not blank too. You could use FORMAT there as well. For example,
Partition-1 =
VAR Partition = TOKENFLEX_COUNT[Partition_1]
RETURN
IF (
ISBLANK ( Partition ),
FORMAT ( TODAY () - 1, "yyyymmdd" ),
FORMAT ( Partition, "Standard" )
)
Hi @Fahad5
Try this:
Partition-1 =
IF(
ISBLANK( [Partition_1] ),
FORMAT( TODAY() - 1, "yyyymmdd" ),
[Partition_1]
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |