Forum Discussion
Excel to dax
- 2 years ago
Hello Ashik008 ,
There are three solutions depending on what your need.
1- Create a calculated table using DAXDate_Dimension table
Fact Table
From your Fact table & Date_dimension table. You will need to modify the following formula according to your need. However, it should utilize the same structure.
Fact with Completed Dates =NATURALLEFTOUTERJOIN (SELECTCOLUMNS ( 'Fact', "Service ID", 'Fact'[Service ID] & "",'Fact'[Service Name] ),SELECTCOLUMNS (Date_table,"Service ID", Date_table[Service ID] & "",Date_table[Completed date]))2-You can use power query. Merge your Fact table with your Date_dimenion table using a Left Outer Join.
3-The final option to use a many-many relationship between both tables (Fact table & Date_dimension table).
Then use a front-end report table visual and use the column in the fact table and the completed date column from your date_dimension table.
Let me know if it works.
Please let me know if this works for you, and accept it as a solution. Your Kudo is much appreciated.
Hello Ashik008 ,
I created two dummy tables in power bi, and created a calculated column that calculates the formula you need to convert into a dax expression with the assumption that you need it as a Calculated column.
However, I also created it as a measure
Please let me know if it works for you, and accept it as a solution if it serves the purpose. Your kudos is much appreciated 🙂
Hello Ashik008 ,
Service ID only exists in one table, not both table
Vendor Service IdVendor
| 211591 | ABC |
| 211591 | ABC |
While the other table does not have Service ID.
Assessment TypeAssessment Completed Date
| VRA - Initial Risk Assessment | Tuesday, August 15, 2023 |
| VRA - Initial Risk Assessment Imported | Wednesday, April 17, 2024 |
Is there something wrong with the sample data? Can you please explain?
- Ashik0082 years agoFrequent Visitor
service id is available on both table .
table is like this
service id completed date 211591 211591 i need the date data in this column
- Moetazzahran2 years ago
Resolver II
Hello Ashik008 ,
There are three solutions depending on what your need.
1- Create a calculated table using DAXDate_Dimension table
Fact Table
From your Fact table & Date_dimension table. You will need to modify the following formula according to your need. However, it should utilize the same structure.
Fact with Completed Dates =NATURALLEFTOUTERJOIN (SELECTCOLUMNS ( 'Fact', "Service ID", 'Fact'[Service ID] & "",'Fact'[Service Name] ),SELECTCOLUMNS (Date_table,"Service ID", Date_table[Service ID] & "",Date_table[Completed date]))2-You can use power query. Merge your Fact table with your Date_dimenion table using a Left Outer Join.
3-The final option to use a many-many relationship between both tables (Fact table & Date_dimension table).
Then use a front-end report table visual and use the column in the fact table and the completed date column from your date_dimension table.
Let me know if it works.
Please let me know if this works for you, and accept it as a solution. Your Kudo is much appreciated.