Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Hard Code Values into a Matrox Table

Hi Experts

 

I want to add a dax measure and or a calculated column to Hard code values into a matric table based on Period (months)

End result show be

The main FACT Table is Input and column with M values are in M Column

M0M1M2M3M4M5M6M7M8M9M10M11M12M13M14M15M16M17M18M19M20M21M22M23M24M25M26M27M28M29M30M31M32M33M34M35
000000000021111111000000000000000000
6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.


Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit - I would like to added the following Values to my FACT Table (Input) as a calculated column for the following month....Hard coded values...

Capture.PNG

 

@Anonymous ,  Try a new column like

Date(2012, 1+ right([M column], len([M column])-1),1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit - this give dates not the values in the value column

@Anonymous , Try like

 


Switch(true(),
[M column] in {"M10"} , 2,
[M column] in {"M11","M12","M13","M14","M15","M16","M17"} , 2,
0
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit - Agree but it has to be for those date also....

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.