Forum Discussion
Using RELATED DAX function in FACT table from SQLServer
- 1 year ago
I was on the right track with:
CALCULATETABLE(ADDCOLUMNS('ReportMetric',"FieldName", LOOKUPVALUE('Field'[FieldName], 'Field'[FieldId],'ReportMetric'[MetricId])),FILTER(ReportMetric, 'ReportMetric'[ReportId] = [seletectedReportId]))Unfortunately, I was missing a relationship between my dax table and the Reports table.
Works now. Thanks for everyone's help.
Hello all,
if calculated columns don't play nice in a Direct Query connection, when using fields from a different table, is there another way to go? i.e., Import mode or using measures instead of calculated columns? My issue is that I have several metrics stored in a single FACT table and plan to pivot the metrics into columns of a matrix but each metric/column will require a different level of precision.
I basically have some values that will require 0 decimal places (whole numbers/integers), some that require 1 decimal place and some that will require 2 decimal places. I will ROUND the values to the required level of precision.
Any thoughts or suggestions as to how I may accomplish this? I feel like business rules where metric precision is concerned should be coming from a table in PowerBI however, if forced to do so, I could create a separate table in the SQL Server Database that stores the precision of each tracked metric and then join to my data table before importing into PowerBI. Then I would have the level of precision in my FACT table and I don't have to use the RELATED DAX function. I think I will defer the approach to anyone more experienced than myself in PowerBI.
Regards,
Riyaz
- lbendlin1 year ago
Super User
Consider using Calculation Groups, Visual Calculations, or Field Parameters. They all support dynamic formatting.
- v-aatheeque1 year ago
Community Support
Hi Riyaz999
Just following up to see if the suggestion shared by the lbendlin using Calculation Groups, Visual Calculations, or Field Parameters for dynamic formatting helped resolve your issue.
If you're still facing challenges or exploring alternate approaches, feel free to share any updates.
We're here to help!
- Riyaz9991 year ago
Helper II
Hi v-aatheeque,
to be honest, I haven't figured out how to use Calculation Groups, Visual Calculations or Field Parameters for my situation. I did some research online to learn how to use these suggestions but still don't know enough to be able to apply the knowledge to solve my issue.