How can I make single control field to control multiple columns in Google Data Studio? - controls

I like to make a single control field, such as dropdown-list, to control multiple columns with the same value. As the sample link(1) below in Google Sheet. My raw data, consist of the type of anesthesia, the name of the nurse during surgery.
This sheet "RR" consist of raw data, then I make a new table using some functions, to look like sheet "LogBook".
If I choose name of the nurse for example "Wayan", then it will count each part of surgery and type of anesthesia that Wayan had been involved, and it will count the type of surgery also.
When I use Google Data Studio, I can only make single control field for example "Nurse in pre surgery", "Nurse in intra surgery", or "Nurse in post surgery". Or if I select all of the control fields, then it become "AND", that's not what I want. I want to make a single control like "Name of the nurse", then google data studio, will show like the one in Google Sheet.
The table in Google Data Studio, show same value for all columns, which is wrong. The data in Google Sheets is the right one (which is using COUNTIF function).
Inputs:
LogBook in GoogleSheet
LogBook in Google Data Studio
Images:
This is the raw data in Google Sheet "RR":
This is how the data should be shown in Google Data Studio:
But Google Data Studio does not allow me to use 1 control field, to control multiple columns:
If I select same value in all of control fields, then it become "AND" relation, which is wrong:

One approach is to CONCAT the three fields (Nurse in Pre Surgery, Nurse in Intra Surgery and Nurse in Post Surgery) to create a single new field with CSV (Comma Separated Values). The CSV Filter Control Community Visualisation (click on the icon on the toolbar and select to view all) can then be used to filter by nurse:
Data Tab
Column to filter on:
CONCAT(Nurse in Pre Surgery, ", ", Nurse in Intra Surgery, ", ", Nurse in Post Surgery)
Cross-filtering: Select (☑) (selection will ensure that filtering will be applied to other charts)
Style Tab
OR instead of AND behaviour: Select (☑) (tick so that data for multiple nurses can be viewed, when selected)
Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate:

Related

PowerApps for MS Teams - Duplicate record added to combobox when setting DefaultSelectedItems

I am developing a Power App using the Teams version. We have two tables in Dataverse acting as the main data sources. There is an inheritance relationship between these two tables, where one holds parent objects and the other child. I have an overview screen which displays a single record and it is important that a user can select both parent and child records from a single combobox and have the data associated to the selected record displayed.
In order to achieve this I have a collection which holds the ID and Parent/Child type of each record to form a full list of records from both tables. Collection is built as follows:
ClearCollect(Collection_RecordSelect,AddColumns(ShowColumns(record_parents,"recordID","recordID_numeric"),"type","parent")); Collect(Collection_RecordSelect, AddColumns(ShowColumns(record_children,"recordID","recordID_numeric"),"type","child"));
When a user selects a record from the combobox, the ID value from the collection is looked up against the respective data source to get the rest of the data for the record.
The issue I have now is, when a user makes a change to a record in another screen, the app returns to this overview screen to show the record they have just changed. To achieve this I used the DefaultSelectedItems property of the combobox which looks at a selectedRecord variable containing the record ID as a string, set after a user changes the record in another screen. As the combobox requires a record, the combobox uses the selectedRecord variable to Lookup into the collection I referenced earlier to get the full record, unless it's blank in which case it default to the first record. Shown below:
If(IsBlank(selectedRecordID),First(Collection_RecordSelect),Lookup(Collection_RecordSelect, recordID = selectedRecordID))
This results in the combobox displaying two instances of the selected record and showing the old version of the record before the user made changes on the overview screen. If you select another record, the duplicate disappears. If you select the other duplicate record in the combobox, the user's changes are then shown on the overview screen.
Screenshot of duplicate record in combobox.
I have tried creating a single collection, containing all records from both tables, however as they are slightly different due to the inheritance field in the child table they don't merge properly and data is missed. Unfortunately, I need the inheritance field on the overview screen so I can't use ShowColumns and remove it.
I have recently re-built the app in Teams as opposed to standard Power Apps. This solution worked fine in the standard Power Apps environment, so I have a suspicion it may be a bug with the Power Apps for Teams combobox? Unless I am making a mistake, I think this is probably true as I've just tested and the "Classic Control" combobox doesn't have the same behavior, shame because it looks rubbish compared to the Teams one!
I have turned off multi-select on the combobox and search and the problem still exists.
Any help would be hugely appreciated!

Advanced Custom Fields: How do I display the value from a relational page link into another text field

How do I display the value from a relational page link into another text field?
I am creating a Family Tree website for my family. I have set up advanced custom fields where they enter information about their ancestors. To make their experience easier, I am trying to have certain fields populate automatically. For example, if they select their grandmother's name from a relational page link, (each person has their own post created for them), I would then like the value from their relational link selection to appear in real-time in a separate text field, visually. This text field is only there to be used as a label of sorts to indicate where to add the great-grandparent's names. Because as you go deeper into the generations it can get difficult to know where you are at. Having this functionality will orient them quickly as to where to go next.
If this relation link value could populate the Name/Label of the text field that would even be better but I thought that might not be possible.

Table records display on the bases of enter number in textbox power bi

I have a table in power bi
in that there are so many records so i want a text box or something like that where use type number then on the bases of this records should be displayed in table e.g if we use type 5 then only 5 records will display.. if user type 10 then 10 record will display if there is nothing then all records should be displayed
how i should do this .. i know how to do in qliksense but not in power bi
and one thing more i want to apply that condition in field Cover Name
=if(Assured_Name = 'AFPY','AF',
if(COVER_NAME = '7co','ABC',
if(match(COVER_NAME,'AFPY','7CO')=0,'Other',null())))
Here there power bi sample file
https://www.dropbox.com/s/kfym4mb0fiaxym5/Claims2.pbix?dl=0
The PowerBI equivalent of a 'control' that the user interacts with to filter a visual is the 'Slicer.' The slicer can then be configured to enable a 'Search' textbox where the user can type in the desired text that is wanted for filtering the table.
Create a slicer visual next to your table and add the column that you want to search to the slicer's "Field" box. Then, hoover your mouse over the slicer and a group of icons will appear (usually at the top but sometimes beneath the visual if there's no space to put it). One of these is the ellipsis, it looks like 3 dots. Click on the ellipsis and enable 'Search.'
You will see that a row is created in the slicer where the user can type. This text will filter the contents of the slicer, which is then used to filter the table.

Extracting 'list of items' data validation criteria info to a cell in google sheets

I have a google sheet that contains a list of technical settings and rules.
Each rule is store in 1 row and across 5 columns (number, name , notes, condition, action).
When a rule has more than one condition (or action), all conditions are stored 1 cell and are displayed using the data validation 'list of items' setting.
I need a way to extract the information contained in the 'data validation' list of items criteria field (as per image) into a cell. This sheet contains hundreds of data validation cells across which the same action has to be performed.
At the moment my only solution is to open the data validation dialog box and copy/paste the content of the criteria field into a cell but this is unsustainable. any help would be greatly appreciated.
enter image description here

In Google Sheets, Is there a way to use hyperlinks in a data validated range?

In Google Sheets, a cell using a data validated range consisting of hyperlinks will only display the link text and is not an actual link.
Example, I have a google spreadsheet consisting of 2 sheets. Sheet 1 has a cell with data validation getting it's values from a range on sheet 2, like so Sheet2!B2:B50
Sheet 2 cell B2 contains a hyperlink like this:
=hyperlink("https://docs.google.com", "LINK TEXT")
When you select that item back in Sheet 1 in the validated cell, the cell only displays LINK TEXT and is not a hyperlink.
Is there a way to use hyperlinks in a data validated range?
I think, there's still no direct way to do this since you'd asked the question. But it's possible in two ways:
make OnEdit script and replace selected text with
corresponding link
make 2 separate columns and emulate choise.
I want to suggest the second way as it's easier to implement.
The result will look like this:
Here's the link to my test file.
Step 1. Prepare data
So Sheet2 contains data, it should look like this:
Separate:
links in column B
and their labels in column A.
Step 2. Make Data Validation
Go to Sheet1. And in required range make the new rule for Data Validation. In our sample it's column A. So select range > Go to Data > Validation... > select range Sheet2!A2:A100 from your data sheet.
Note that in Google Sheets you may use bigger range for validation, sheets would ignore blanks.
Also there's a good reason to make the result of selection invisible. To make it, select custom number format and use this text:
;;;
Step 2. Make Hyperlinks with formula
In Sheet1, cell B2 paste the formula:
=ArrayFormula(if(A2:A<>"",HYPERLINK(VLOOKUP(A2:A,Sheet2!A:B,2,0),A2:A),""))
It will expand automatically.
That's all!

Resources