Forum Discussion
GalaBI79
1 year agoRegular Visitor
Slicer selection not working in virtual table creation
Hi all, First of all, apologies for my english, but it's not my first language 😁 I'm new to Power BI so sorry for any mistakes. I have a table with invoices, organized by invoice date. I...
- Anonymous1 year ago
Hi GalaBI79 ,
I made a sample for you.
Measure = var _column = MAX('Table3'[Column1]) var _value= SWITCH(TRUE(), _column="Today"&&HASONEVALUE('Calendar'[Date]),CALCULATE([InvoiceValue],'Invoice'[InvoiceDate]=SELECTEDVALUE('Calendar'[Date])), _column="Month"&&HASONEVALUE('Calendar'[Date]),CALCULATE([InvoiceValue],FORMAT('Invoice'[InvoiceDate],"MMMM")=SELECTEDVALUE('Calendar'[Date].[Month])), _column="Month To Date"&&HASONEVALUE('Calendar'[Date]),CALCULATE([InvoiceValue],Month('Invoice'[InvoiceDate])<=MONTH(SELECTEDVALUE('Calendar'[Date]))), _column="Today"&&HASONEVALUE('Calendar'[Date].[Month]),CALCULATE([InvoiceValue],'Invoice'[InvoiceDate]=MAX('Calendar'[Date])), _column="Month"&&HASONEVALUE('Calendar'[Date].[Month]),CALCULATE([InvoiceValue],FORMAT('Invoice'[InvoiceDate],"MMMM")=SELECTEDVALUE('Calendar'[Date].[Month])), _column="Month To Date"&&HASONEVALUE('Calendar'[Date].[Month]),CALCULATE([InvoiceValue],Month('Invoice'[InvoiceDate])<=MONTH(MIN('Calendar'[Date]))) ) RETURN _valueNote: This measure only considers the month and does not consider the year as a filter condition.
Best Regards,
Wearsky
GalaBI79
1 year agoRegular Visitor
Hello and thanks for the reply,
I used measures because I couldn't find a better way to make the three values (TODAY, MONTH and MONTH TO DATE) appear all one under the other, as a single column.
Do you think there is another way to represent the data without using measures?