Forum Discussion
JuanDtM23
5 years agoHelper II
Count values from one table in another table
Good afternoon
I have a reference table called "SERVICIOS_TRAZADORES" which looks like this:
Additionally I have a table called "Services Enabled" has the following form:
As noted, tables can be related using service code.
My intention is to calculate a measure that tells me the number of tracer services enabled.
That is, count in the "Services Enabled" table how many plotter services exist.
Any ideas?
Thanks in advance.
- Are Tracer Services columns, such as outpatient, hospitable, etc.?
If so, I suggest you test a UNPIVOT of the data in Power Query, so click Transform Data on the Home tab to open Power Query.
Select all columns related to plotter services, and then select the Transform > Explode Only Selected Columns tab.
Change attribute name > Plotter service type, Filter value only for "Yes". Delete the Value column.
Now you can Close and Apply and create relationship 1 to many in your code and counting should be easy. Simply place the new plotter service in values such as a different count or count if you prefer.
1 Reply
- AllisonKennedyCommunity ChampionAre Tracer Services columns, such as outpatient, hospitable, etc.?
If so, I suggest you test a UNPIVOT of the data in Power Query, so click Transform Data on the Home tab to open Power Query.
Select all columns related to plotter services, and then select the Transform > Explode Only Selected Columns tab.
Change attribute name > Plotter service type, Filter value only for "Yes". Delete the Value column.
Now you can Close and Apply and create relationship 1 to many in your code and counting should be easy. Simply place the new plotter service in values such as a different count or count if you prefer.