Forum Discussion

Mark_Berry's avatar
Mark_Berry
Icon for Helper I rankHelper I
2 years ago

Create a DAX measure to return all text values from a table.

Hello everyone.

I am trynig to create a measure which returns the enitre tex contents of a colum to work in conjunction with a slicer which works across mulitple tables. 
An example of ameasure which works with the slicer is as follows

Count of Not Overdue =
if(
HASONEVALUE('Slicer Table'[Value1]),
SWITCH(
values('Slicer Table'[Value1]),
    "Work Pack",Calculate(COUNTA('Work Pack'[Overdue]),FILTER('Work Pack','Work Pack'[Overdue]="Not Overdue")),
    "Non Compliance",Calculate(COUNTA('INon Compliance'[Overdue]), FILTER('Non Compliance','Non Compliance'[Overdue] ="Not Overdue")),
    "Work Lots",Calculate(COUNTA('Work Lots'[Overdue]),FILTER('Work Lots','Work Lots'[Overdue] = "Not Overdue")),
    "Questions", Calculate(COUNTA('Questions'[Overdue]),FILTER('Questions','Questions'[Overdue] = "Not Overdue")),
    "Requests",Calculate(COUNTA('Requests'[OverDue]),FILTER('Requests','Requests'[OverDue]="Not Overdue")
)))
I need to use a similar dax to return all values which are in collumns named " Reference". and "Description"

Ultimately I would like the below to be the result for each slicer selection. 
ReferenceDescription
Lot#1Information                    
Lot#2Information                    
Lot#3Information                    

 

ReferenceDescription
Questions#1Information                    
Questions#2Information                    
Questions#3Information                    


2 Replies

  • Daniel29195's avatar
    Daniel29195
    Icon for Community Champion rankCommunity Champion

    Mark_Berry 

     

    sorry but i didnt quite understand your requirement, 

    it would be helpful if you could share sample data , just to know how the data is structured. 

     

     

    best regards

  • Data is currently structured as individual tables in excel eg Work Pack is one table.

    The meausre I have supplied above is one which corresponds to a slicer table I have created to allow switching between each report type for values that are numerical in format.
    Each report type has a collum which is the reference eg Lot#1 for each individual report, I would like develop a measure that allows my slicer to return the entire collum contents of text collums.  the end result would look like this 

    When Lots is selected

    ReferenceDescription
    Lot#1Information                    
    Lot#2Information                    
    Lot#3Information                    


    When Question is Selected

    ReferenceDescription
    Questions#1Information                    
    Questions#2Information                    
    Questions#3Information