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.
Hi All,
i'm try to display Current Quarter,Last Quater,Next Quarter Text in table but it is not displaying could please suggest,
Solved! Go to Solution.
Hi @Anonymous ,
According to the error message, the formula returns two different types of values. It's not supported for a single column to have different types of values in Power BI.
The first three if conditions return text-type data, but in the last if condition you are using “+”. You should use "&" to concatenate text instead of "+".
Cal Year/Qtr = IF(FC[Cal year/Quarter] = FORMAT(TODAY(),"yyyy q"),"Current Quarter", IF(FC[Cal year/Quarter] = FORMAT(EOMONTH(TODAY(),-1),"yyyy q"),"Last Quarter", IF(FC[Cal year/Quarter] = FORMAT(EOMONTH(TODAY(),+1),"yyyy q"),"Next Quarter", IF(FC[Cal year/Quarter] = "Not assigned",FC[Cal year/Quarter],RIGHT(FC[Cal year/Quarter],4)&""&LEFT(FC[Cal year/Quarter],2)))))
Best Regards,
Jay
Hi @Anonymous ,
According to the error message, the formula returns two different types of values. It's not supported for a single column to have different types of values in Power BI.
The first three if conditions return text-type data, but in the last if condition you are using “+”. You should use "&" to concatenate text instead of "+".
Cal Year/Qtr = IF(FC[Cal year/Quarter] = FORMAT(TODAY(),"yyyy q"),"Current Quarter", IF(FC[Cal year/Quarter] = FORMAT(EOMONTH(TODAY(),-1),"yyyy q"),"Last Quarter", IF(FC[Cal year/Quarter] = FORMAT(EOMONTH(TODAY(),+1),"yyyy q"),"Next Quarter", IF(FC[Cal year/Quarter] = "Not assigned",FC[Cal year/Quarter],RIGHT(FC[Cal year/Quarter],4)&""&LEFT(FC[Cal year/Quarter],2)))))
Best Regards,
Jay
Hi, @Anonymous
Since I don't take a look into your data structure, can you try the below example, if not working please provide more info.
Cal Year/Qtr =
VAR CalYearQ = FC[Cal year/Quarter]
VAR CurrQ = FORMAT(TODAY(),"yyyy q")
VAR LastQ = FORMAT(EOMONTH(TODAY(),-1),"yyyy q")
CAR NextQ = FORMAT(EOMONTH(TODAY(),+1),"yyyy q")
SWITCH(TRUE(),
CalYearQ = CurrQ, "Current Quarter",
CalYearQ = LastQ, "Last Quarter",
CalYearQ = NextQ, "Next Quarter",
CalYearQ = Not assigned", CalYearQ,
RIGHT(CalYearQ,4)+""+LEFT(CalYearQ,2)))))
Proud to be a Super User!
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |