Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Gurus,
I need help to write a calculatetable function to extract unique values of a column and assign a set of values (Q1,Q2,Q3) to each.
Example:
Table 1:
Column1 |
Oracle |
SAP SAP |
Microsoft |
Microsoft |
Microsoft |
Result Table
Column1 | Quarter |
Oracle | Q1 |
Oracle | Q2 |
Oracle | Q3 |
SAP | Q1 |
SAP | Q2 |
SAP | Q3 |
Microsoft | Q1 |
Microsoft | Q2 |
Microsoft | Q3 |
Hi @Anonymous,
You need a combination of CROSSJOIN and DISTINCT, something like that:
In plain text:
Result =
VAR Quarters = SELECTCOLUMNS ( { "Q1", "Q2", "Q3" }, "Quarter", [Value] )
RETURN
CROSSJOIN ( DISTINCT ( 'Table'[Column1] ), Quarters )
Best Regards,
Alexander
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.