powerBi distinct
时间: 2023-09-09 08:07:17 浏览: 101
Power BI is a powerful business intelligence tool developed by Microsoft. It allows users to analyze and visualize data from various sources. To get distinct values in Power BI, you can use the DISTINCT function in DAX (Data Analysis Expressions) language.
Here's an example of how you can use the DISTINCT function in Power BI:
1. Open Power BI Desktop and load your dataset.
2. Create a new measure or column in the Power BI data model.
- For a measure, go to the Modeling tab, click on New Measure, and enter the formula using the DISTINCT function.
- For a column, go to the Modeling tab, click on New Column, and enter the formula using the DISTINCT function.
Example measure formula:
```
DistinctCount = DISTINCTCOUNT('TableName'[ColumnName])
```
Example column formula:
```
DistinctColumn = DISTINCT('TableName'[ColumnName])
```
3. Replace 'TableName' with the appropriate table name in your dataset, and 'ColumnName' with the specific column name where you want to get distinct values.
4. Once you've created the measure or column, you can use it in your visualizations or further analysis.
By using the DISTINCT function, you can count distinct values or create a new column that contains only unique values from a specific column in your dataset.
阅读全文